1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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>
This commit is contained in:
Michael Niedermayer 2012-08-04 15:39:22 +02:00
parent 2107009e7d
commit 3e1cf49676

View File

@ -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]);