aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-06-18 01:44:24 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-06-18 01:44:24 +0200
commit3f2f87cd5a84dc44de76af49a05778cb89f6de5c (patch)
treec3439e4528554f0c841ffb60fe2beba0cf162d19
parent9f028b3f3af549a95b4a50af6a1d02acc5089a9f (diff)
parent74bc9458057f07c0820c3d3264396c4c64442e47 (diff)
downloadffmpeg-3f2f87cd5a84dc44de76af49a05778cb89f6de5c.tar.gz
Merge commit '74bc9458057f07c0820c3d3264396c4c64442e47'
* commit '74bc9458057f07c0820c3d3264396c4c64442e47': flvenc: Don't over-count metadata. Conflicts: tests/ref/lavf/flv_fmt tests/ref/vsynth/vsynth1-flashsv tests/ref/vsynth/vsynth1-flv tests/ref/vsynth/vsynth2-flashsv tests/ref/vsynth/vsynth2-flv Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/flvenc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c
index 7fad21cc13..dd74d4c4da 100644
--- a/libavformat/flvenc.c
+++ b/libavformat/flvenc.c
@@ -304,7 +304,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
@@ -330,6 +330,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");