1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-10-02 17:12:49 +02:00

Make sure that the calculated duration doesn't decrease

Originally committed as revision 10374 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
David Conrad 2007-09-05 00:25:40 +00:00
parent 8ffc5f9e92
commit 7f8582dfc6

View File

@ -748,7 +748,7 @@ static int mkv_write_packet(AVFormatContext *s, AVPacket *pkt)
if (ret < 0) return ret;
}
mkv->duration = pkt->pts + pkt->duration;
mkv->duration = FFMAX(mkv->duration, pkt->pts + pkt->duration);
return 0;
}