1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-11 01:16:45 +00:00

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
This commit is contained in:
eugeni 2007-06-07 22:45:41 +00:00
parent 8d404b6658
commit aa79f008cd

View File

@ -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);