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

reimar subversion at mplayerhq.hu
Fri Apr 22 08:17:34 CEST 2011


Author: reimar
Date: Fri Apr 22 08:17:34 2011
New Revision: 33277

Log:
Use metadata tag API to get attachment filename.

Modified:
   trunk/libmpdemux/demux_lavf.c

Modified: trunk/libmpdemux/demux_lavf.c
==============================================================================
--- trunk/libmpdemux/demux_lavf.c	Fri Apr 22 08:15:50 2011	(r33276)
+++ trunk/libmpdemux/demux_lavf.c	Fri Apr 22 08:17:34 2011	(r33277)
@@ -456,10 +456,12 @@ static void handle_stream(demuxer_t *dem
             break;
         }
         case AVMEDIA_TYPE_ATTACHMENT:{
-            if (st->codec->codec_id == CODEC_ID_TTF)
-                demuxer_add_attachment(demuxer, st->filename,
+            if (st->codec->codec_id == CODEC_ID_TTF) {
+                AVMetadataTag *fnametag = av_metadata_get(st->metadata, "filename", NULL, 0);
+                demuxer_add_attachment(demuxer, fnametag ? fnametag->value : NULL,
                                        "application/x-truetype-font",
                                        codec->extradata, codec->extradata_size);
+            }
             break;
         }
         default:


More information about the MPlayer-cvslog mailing list