1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-09-27 07:40:36 +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:
Michael Niedermayer 2012-07-02 22:59:42 +02:00
parent 41dd30068a
commit 2c883c6acf

View File

@ -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 */