aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/flvenc.c
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2008-05-25 01:22:06 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2008-05-25 01:22:06 +0000
commita9ee86e79b767d29362986ced0ec95d4de2b3eb1 (patch)
tree0707cf018d276001489b342cb067dd0ad7033d43 /libavformat/flvenc.c
parentfd83ad7f02559091318f655e7b8a2f241f7b0244 (diff)
downloadffmpeg-a9ee86e79b767d29362986ced0ec95d4de2b3eb1.tar.gz
set correct duration when using b frames
Originally committed as revision 13372 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/flvenc.c')
-rw-r--r--libavformat/flvenc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c
index 1a781f4b92..f537a9c4eb 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;