[FFmpeg-devel] [PATCH 2/2] lavf/nutenc: write stream metadata.

Nicolas George nicolas.george at normalesup.org
Sun Aug 19 10:31:26 CEST 2012


Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
---
 libavformat/nutenc.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavformat/nutenc.c b/libavformat/nutenc.c
index 05d2b08..617ffb0 100644
--- a/libavformat/nutenc.c
+++ b/libavformat/nutenc.c
@@ -462,6 +462,7 @@ static int write_globalinfo(NUTContext *nut, AVIOContext *bc){
 static int write_streaminfo(NUTContext *nut, AVIOContext *bc, int stream_id){
     AVFormatContext *s= nut->avf;
     AVStream* st = s->streams[stream_id];
+    AVDictionaryEntry *t = NULL;
     AVIOContext *dyn_bc;
     uint8_t *dyn_buf=NULL;
     int count=0, dyn_size, i;
@@ -469,6 +470,8 @@ static int write_streaminfo(NUTContext *nut, AVIOContext *bc, int stream_id){
     if(ret < 0)
         return ret;
 
+    while ((t = av_dict_get(st->metadata, "", t, AV_DICT_IGNORE_SUFFIX)))
+        count += add_info(dyn_bc, t->key, t->value);
     for (i=0; ff_nut_dispositions[i].flag; ++i) {
         if (st->disposition & ff_nut_dispositions[i].flag)
             count += add_info(dyn_bc, "Disposition", ff_nut_dispositions[i].str);
-- 
1.7.10.4



More information about the ffmpeg-devel mailing list