From aa79f008cd96f4cd55f937280a1f032a5a6d8891 Mon Sep 17 00:00:00 2001 From: eugeni Date: Thu, 7 Jun 2007 22:45:41 +0000 Subject: Fix segfault when encoding from an mkv file with embedded fonts. Patch by Dominique Dumont (domi dumont at free fr). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23502 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpdemux/demux_mkv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libmpdemux/demux_mkv.c b/libmpdemux/demux_mkv.c index ff4e3aa183..5d0290bfb3 100644 --- a/libmpdemux/demux_mkv.c +++ b/libmpdemux/demux_mkv.c @@ -1533,7 +1533,8 @@ demux_mkv_read_attachments (demuxer_t *demuxer) "[mkv] Attachment: %s, %s, %u bytes\n", name, mime, data_size); #ifdef USE_ASS - if (extract_embedded_fonts && name && data && data_size && + if (ass_library && + extract_embedded_fonts && name && data && data_size && mime && (strcmp(mime, "application/x-truetype-font") == 0 || strcmp(mime, "application/x-font") == 0)) ass_add_font(ass_library, name, data, data_size); -- cgit v1.2.3