avformat/flvenc: fix assertion failure after 4h muxing
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 30 May 2014 23:43:41 +0000 (01:43 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 2 Jun 2014 20:59:50 +0000 (22:59 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 2e532aa82d2b938a3cd913a363a79bf92ddf1a33)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/flvenc.c

index c16f8eb..15c9997 100644 (file)
@@ -536,7 +536,7 @@ static int flv_write_packet(AVFormatContext *s, AVPacket *pkt)
         sc->last_ts = ts;
 
     avio_wb24(pb, size + flags_size);
-    avio_wb24(pb, ts);
+    avio_wb24(pb, ts & 0xFFFFFF);
     avio_w8(pb, (ts >> 24) & 0x7F); // timestamps are 32 bits _signed_
     avio_wb24(pb, flv->reserved);