From b784346e789814362e196e513a8988cd02d96bac Mon Sep 17 00:00:00 2001 From: Grigori Goronzy Date: Tue, 1 Jun 2010 22:49:22 +0200 Subject: libass: match font attachments based on extension Instead of only relying on the MIME type, use the file extension as a fallback for deciding which attachments are fonts and should be fed to libass. This also refactors the check into a separate function in mpcommon. --- mencoder.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'mencoder.c') diff --git a/mencoder.c b/mencoder.c index 63c4e8bdd1..47f9979b0e 100644 --- a/mencoder.c +++ b/mencoder.c @@ -1060,10 +1060,7 @@ default: { if (ass_library) { for (i = 0; i < demuxer->num_attachments; ++i) { demux_attachment_t* att = demuxer->attachments + i; - if (use_embedded_fonts && - att->name && att->type && att->data && att->data_size && - (strcmp(att->type, "application/x-truetype-font") == 0 || - strcmp(att->type, "application/x-font") == 0)) + if (use_embedded_fonts && attachment_is_font(att)) ass_add_font(ass_library, att->name, att->data, att->data_size); } } -- cgit v1.2.3