diff options
author | David Conrad <lessen42@gmail.com> | 2007-09-05 00:25:40 +0000 |
---|---|---|
committer | David Conrad <lessen42@gmail.com> | 2007-09-05 00:25:40 +0000 |
commit | 7f8582dfc635334de7f6fc10c78d45a02dfd1104 (patch) | |
tree | a7403f1d4a8fcd35b1882c9909bcc6b8bf1d998b /libavformat/matroskaenc.c | |
parent | 8ffc5f9e92eacc30b8552b3fdc7b7075a9998607 (diff) | |
download | ffmpeg-7f8582dfc635334de7f6fc10c78d45a02dfd1104.tar.gz |
Make sure that the calculated duration doesn't decrease
Originally committed as revision 10374 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/matroskaenc.c')
-rw-r--r-- | libavformat/matroskaenc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index fcb3470d03..7fba6af3ae 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -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; } |