From 68f4259c12228859f75a38a1ab5232517d1110ef Mon Sep 17 00:00:00 2001 From: Baptiste Coudurier Date: Sun, 31 Aug 2008 02:49:40 +0000 Subject: [PATCH] correctly set track duration Originally committed as revision 15096 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/mxfenc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c index 6713f2a9bd..38624dd6e6 100644 --- a/libavformat/mxfenc.c +++ b/libavformat/mxfenc.c @@ -836,6 +836,8 @@ static int mux_write_packet(AVFormatContext *s, AVPacket *pkt) klv_encode_ber_length(pb, pkt->size); // write length put_buffer(pb, pkt->data, pkt->size); // write value + sc->duration = FFMAX(pkt->pts + pkt->duration, sc->duration); + put_flush_packet(pb); return 0; }