mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-29 22:00:58 +02:00
has_decode_delay_been_guessed: improve heuristic
This allows MR4_TANDBERG_C.264 and MR5_TANDBERG_C.264 to be decoded without -strict 1 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
41dd30068a
commit
2c883c6acf
@ -2284,8 +2284,10 @@ static int has_codec_parameters(AVStream *st)
|
||||
|
||||
static int has_decode_delay_been_guessed(AVStream *st)
|
||||
{
|
||||
return st->codec->codec_id != CODEC_ID_H264 ||
|
||||
st->info->nb_decoded_frames >= 6;
|
||||
if(st->codec->codec_id != CODEC_ID_H264) return 1;
|
||||
if(st->codec->has_b_frames<3)
|
||||
return st->info->nb_decoded_frames >= 6;
|
||||
return st->info->nb_decoded_frames >= 20;
|
||||
}
|
||||
|
||||
/* returns 1 or 0 if or if not decoded data was returned, or a negative error */
|
||||
|
Loading…
x
Reference in New Issue
Block a user