diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-08-04 15:39:22 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-08-04 15:42:44 +0200 |
commit | 3e1cf49676fb2df6445000c30dc6377b808b96da (patch) | |
tree | 7e1a30f011a91690d14039871c2d4ba3a71cebd1 /libavformat | |
parent | 2107009e7d351ff83a87fda161cc5269d2752428 (diff) | |
download | ffmpeg-3e1cf49676fb2df6445000c30dc6377b808b96da.tar.gz |
compute_pkt_fields: do not attempt to calculate dts when the delay hasnt been estimated.
Fixes ticket1242
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-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 7bd815c3d0..af2575aa51 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -1140,7 +1140,7 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st, } } - if(pkt->pts != AV_NOPTS_VALUE && delay <= MAX_REORDER_DELAY){ + if(pkt->pts != AV_NOPTS_VALUE && delay <= MAX_REORDER_DELAY && has_decode_delay_been_guessed(st)){ st->pts_buffer[0]= pkt->pts; 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]); |