On Tue, 10 Jun 2014, Josh Allmann wrote:

Over-counting occurs if framerate is not set.
---
libavformat/flvenc.c |    3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c
index e87c256..cc4c782 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");
--
1.7.9.5

LGTM

// Martin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to