correctly set track duration

Originally committed as revision 15096 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Baptiste Coudurier 2008-08-31 02:49:40 +00:00
parent cdedd878c5
commit 68f4259c12

View File

@ -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;
}