[MPlayer-cvslog] r37312 - trunk/libmpdemux/demux_lavf.c

al subversion at mplayerhq.hu
Sun Oct 26 00:14:31 CEST 2014


Author: al
Date: Sun Oct 26 00:14:31 2014
New Revision: 37312

Log:
demux_lavf: Also add AV_CODEC_ID_OTF attachments

Make those font attachments work with demux_lavf.

Fix other part of 2207

Modified:
   trunk/libmpdemux/demux_lavf.c

Modified: trunk/libmpdemux/demux_lavf.c
==============================================================================
--- trunk/libmpdemux/demux_lavf.c	Sun Oct 26 00:09:27 2014	(r37311)
+++ trunk/libmpdemux/demux_lavf.c	Sun Oct 26 00:14:31 2014	(r37312)
@@ -483,10 +483,11 @@ static void handle_stream(demuxer_t *dem
             break;
         }
         case AVMEDIA_TYPE_ATTACHMENT:{
-            if (st->codec->codec_id == AV_CODEC_ID_TTF) {
+            if (st->codec->codec_id == AV_CODEC_ID_TTF || st->codec->codec_id == AV_CODEC_ID_OTF) {
                 AVDictionaryEntry *fnametag = av_dict_get(st->metadata, "filename", NULL, 0);
+                AVDictionaryEntry *mimetype = av_dict_get(st->metadata, "mimetype", NULL, 0);
                 demuxer_add_attachment(demuxer, fnametag ? fnametag->value : NULL,
-                                       "application/x-truetype-font",
+                                       mimetype ? mimetype->value : "application/x-font",
                                        codec->extradata, codec->extradata_size);
             }
             break;


More information about the MPlayer-cvslog mailing list