Skip to content

Commit 714517b

Browse files
committed
flvenc: Ignore metadata that has special values and is stored already based on
more correct values. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
1 parent 9fa05db commit 714517b

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

libavformat/flvenc.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,22 @@ static int flv_write_header(AVFormatContext *s)
281281
}
282282

283283
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+
}
284300
put_amf_string(pb, tag->key);
285301
avio_w8(pb, AMF_DATA_TYPE_STRING);
286302
put_amf_string(pb, tag->value);

0 commit comments

Comments
 (0)