Commit 7f8582df authored by David Conrad's avatar David Conrad

Make sure that the calculated duration doesn't decrease

Originally committed as revision 10374 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 8ffc5f9e
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment