Commit 4e9e0700 authored by Michael Niedermayer's avatar Michael Niedermayer

has_decode_delay_been_guessed: skip guessing when sps.num_reorder_frames is available

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 1fb07be0
......@@ -2285,6 +2285,11 @@ static int has_codec_parameters(AVStream *st)
static int has_decode_delay_been_guessed(AVStream *st)
{
if(st->codec->codec_id != CODEC_ID_H264) return 1;
#if CONFIG_H264_DECODER
if(st->codec->has_b_frames &&
avpriv_h264_has_num_reorder_frames(st->codec) == st->codec->has_b_frames)
return 1;
#endif
if(st->codec->has_b_frames<3)
return st->info->nb_decoded_frames >= 6;
return st->info->nb_decoded_frames >= 20;
......
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