Browse code

flvenc: Ignore metadata that has special values and is stored already based on more correct values.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>

Michael Niedermayer authored on 2011/10/06 10:20:57
Showing 1 changed files
... ...
@@ -281,6 +281,22 @@ static int flv_write_header(AVFormatContext *s)
281 281
     }
282 282
 
283 283
     while ((tag = av_dict_get(s->metadata, "", tag, AV_DICT_IGNORE_SUFFIX))) {
284
+        if(   !strcmp(tag->key, "width")
285
+            ||!strcmp(tag->key, "height")
286
+            ||!strcmp(tag->key, "videodatarate")
287
+            ||!strcmp(tag->key, "framerate")
288
+            ||!strcmp(tag->key, "videocodecid")
289
+            ||!strcmp(tag->key, "audiodatarate")
290
+            ||!strcmp(tag->key, "audiosamplerate")
291
+            ||!strcmp(tag->key, "audiosamplesize")
292
+            ||!strcmp(tag->key, "stereo")
293
+            ||!strcmp(tag->key, "audiocodecid")
294
+            ||!strcmp(tag->key, "duration")
295
+            ||!strcmp(tag->key, "onMetaData")
296
+        ){
297
+            av_log(s, AV_LOG_DEBUG, "ignoring metadata for %s\n", tag->key);
298
+            continue;
299
+        }
284 300
         put_amf_string(pb, tag->key);
285 301
         avio_w8(pb, AMF_DATA_TYPE_STRING);
286 302
         put_amf_string(pb, tag->value);