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>
Fri, 30 May 2014 23:43:41 +0000 (01:43 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/flvenc.c

index 1d8af33..cebc25a 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);