diff options
author | Daniel Kristjansson <danielk@mrl.nyu.edu> | 2010-03-07 23:10:18 +0000 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at> | 2010-03-07 23:10:18 +0000 |
commit | 663322c1b86053c56d6c25e002f4d3374d2ea085 (patch) | |
tree | bc25fd8a6823d0b398d470c74eac09a7239b06ca /libavformat/utils.c | |
parent | 4245c6ec4ec357fb7bac781d78f9c7d6fa1c8ce7 (diff) | |
download | ffmpeg-663322c1b86053c56d6c25e002f4d3374d2ea085.tar.gz |
Fix pts->dts conversion init for non-zero initial value for pts.
Patch by Daniel Kristjansson, danielk cuymedia net
Originally committed as revision 22297 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r-- | libavformat/utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index f9d497c97f..d431d42bdd 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -2695,7 +2695,7 @@ static int compute_pkt_fields2(AVFormatContext *s, AVStream *st, AVPacket *pkt){ if(pkt->pts != AV_NOPTS_VALUE && pkt->dts == AV_NOPTS_VALUE && delay <= MAX_REORDER_DELAY){ st->pts_buffer[0]= pkt->pts; for(i=1; i<delay+1 && st->pts_buffer[i] == AV_NOPTS_VALUE; i++) - st->pts_buffer[i]= (i-delay-1) * pkt->duration; + st->pts_buffer[i]= pkt->pts + (i-delay-1) * pkt->duration; for(i=0; i<delay && st->pts_buffer[i] > st->pts_buffer[i+1]; i++) FFSWAP(int64_t, st->pts_buffer[i], st->pts_buffer[i+1]); |