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>
pull/28/head
Michael Niedermayer 12 years ago
parent 2107009e7d
commit 3e1cf49676
  1. 2
      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]);

Loading…
Cancel
Save