Commit 3e1cf496 authored by Michael Niedermayer's avatar Michael Niedermayer

compute_pkt_fields: do not attempt to calculate dts when the delay hasnt been estimated.

Fixes ticket1242
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 2107009e
......@@ -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]);
......
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