Commit 5e87222f authored by Martin Storsjö's avatar Martin Storsjö

flvdec: Don't export metadata entries that aren't proper metadata

This avoids writing these entries doubly if transcoding from
flv to flv, since the muxer blindly writes any and all metadata
keys set, in addition to the fixed fields that the muxer
always writes.
Signed-off-by: 's avatarMartin Storsjö <martin@martin.st>
parent b204c46d
......@@ -296,6 +296,20 @@ static int amf_parse_object(AVFormatContext *s, AVStream *astream, AVStream *vst
acodec->bit_rate = num_val * 1024.0;
}
if (!strcmp(key, "duration") ||
!strcmp(key, "filesize") ||
!strcmp(key, "width") ||
!strcmp(key, "height") ||
!strcmp(key, "videodatarate") ||
!strcmp(key, "framerate") ||
!strcmp(key, "videocodecid") ||
!strcmp(key, "audiodatarate") ||
!strcmp(key, "audiosamplerate") ||
!strcmp(key, "audiosamplesize") ||
!strcmp(key, "stereo") ||
!strcmp(key, "audiocodecid"))
return 0;
if(amf_type == AMF_DATA_TYPE_BOOL) {
av_strlcpy(str_val, num_val > 0 ? "true" : "false", sizeof(str_val));
av_dict_set(&s->metadata, key, str_val, 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment