[FFmpeg-devel] [PATCH 11/21] libavformat/movenc, isom: support metadata in mp4 files

erkki.seppala.ext at nokia.com erkki.seppala.ext at nokia.com
Tue Aug 23 12:03:29 EEST 2016


From: Erkki Seppälä <erkki.seppala.ext at nokia.com>

This involves adding a new tag to the ff_mp4_obj_type table as well as
modifying mp4_get_codec_tag to return 'meta' for AV_CODEC_ID_META.

Signed-off-by: Erkki Seppälä <erkki.seppala.ext at nokia.com>
Signed-off-by: OZOPlayer <OZOPL at nokia.com>
---
 libavformat/isom.c   | 1 +
 libavformat/movenc.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/libavformat/isom.c b/libavformat/isom.c
index 473700f..9fb96ef 100644
--- a/libavformat/isom.c
+++ b/libavformat/isom.c
@@ -66,6 +66,7 @@ const AVCodecTag ff_mp4_obj_type[] = {
     { AV_CODEC_ID_QCELP       , 0xE1 },
     { AV_CODEC_ID_MPEG4SYSTEMS, 0x01 },
     { AV_CODEC_ID_MPEG4SYSTEMS, 0x02 },
+    { AV_CODEC_ID_META        , 0x03 },
     { AV_CODEC_ID_NONE        ,    0 },
 };
 
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 141f1a5..ff4bf85 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -1175,6 +1175,7 @@ static int mp4_get_codec_tag(AVFormatContext *s, MOVTrack *track)
     else if (track->par->codec_type == AVMEDIA_TYPE_VIDEO)  tag = MKTAG('m','p','4','v');
     else if (track->par->codec_type == AVMEDIA_TYPE_AUDIO)  tag = MKTAG('m','p','4','a');
     else if (track->par->codec_id == AV_CODEC_ID_DVD_SUBTITLE)  tag = MKTAG('m','p','4','s');
+    else if (track->par->codec_id == AV_CODEC_ID_META)       tag = MKTAG('m','e','t','a');
 
     return tag;
 }
-- 
2.7.4



More information about the ffmpeg-devel mailing list