[SCM] libav/experimental: set correct duration when using b frames

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 16:21:39 UTC 2013


The following commit has been merged in the experimental branch:
commit a9ee86e79b767d29362986ced0ec95d4de2b3eb1
Author: Baptiste Coudurier <baptiste.coudurier at gmail.com>
Date:   Sun May 25 01:22:06 2008 +0000

    set correct duration when using b frames
    
    Originally committed as revision 13372 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c
index 1a781f4..f537a9c 100644
--- a/libavformat/flvenc.c
+++ b/libavformat/flvenc.c
@@ -306,7 +306,7 @@ static int flv_write_packet(AVFormatContext *s, AVPacket *pkt)
         put_byte(pb, enc->extradata_size ? enc->extradata[0] : 0);
     put_buffer(pb, pkt->data, size);
     put_be32(pb,size+flags_size+11); // previous tag size
-    flv->duration = pkt->pts + pkt->duration;
+    flv->duration = FFMAX(flv->duration, pkt->pts + pkt->duration);
 
     put_flush_packet(pb);
     return 0;

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list