diff options
author | Josh Allmann <joshua.allmann@gmail.com> | 2014-06-10 18:45:07 -0700 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2014-06-17 21:38:21 +0200 |
commit | 74bc9458057f07c0820c3d3264396c4c64442e47 (patch) | |
tree | 9b847c3a87aa4b70cc36791ca83173b1aa2065a0 /libavformat/flvenc.c | |
parent | 49106844929b7b71ac719064d640f8aa56c89b1f (diff) | |
download | ffmpeg-74bc9458057f07c0820c3d3264396c4c64442e47.tar.gz |
flvenc: Don't over-count metadata.
Over-counting occurs if framerate is not set.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavformat/flvenc.c')
-rw-r--r-- | libavformat/flvenc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c index e87c256694..cc4c782771 100644 --- a/libavformat/flvenc.c +++ b/libavformat/flvenc.c @@ -282,7 +282,7 @@ static int flv_write_header(AVFormatContext *s) /* mixed array (hash) with size and string/type/data tuples */ avio_w8(pb, AMF_DATA_TYPE_MIXEDARRAY); metadata_count_pos = avio_tell(pb); - metadata_count = 5 * !!video_enc + + metadata_count = 4 * !!video_enc + 5 * !!audio_enc + 1 * !!data_enc + 2; // +2 for duration and file size @@ -308,6 +308,7 @@ static int flv_write_header(AVFormatContext *s) if (framerate != 0.0) { put_amf_string(pb, "framerate"); put_amf_double(pb, framerate); + metadata_count++; } put_amf_string(pb, "videocodecid"); |