mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-14 22:22:59 +02:00
has_decode_delay_been_guessed: skip guessing when sps.num_reorder_frames is available
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
1fb07be062
commit
4e9e0700fb
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user