has_decode_delay_been_guessed: tighten up the heuristic.

This adds the minimum delay needed with the current decoder to
recognize the reorder buffer size for the reference bitstreams.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-07-02 23:23:33 +02:00
parent 4e9e0700fb
commit a08efa2e36
1 changed files with 4 additions and 1 deletions

View File

@ -2292,6 +2292,9 @@ static int has_decode_delay_been_guessed(AVStream *st)
#endif #endif
if(st->codec->has_b_frames<3) if(st->codec->has_b_frames<3)
return st->info->nb_decoded_frames >= 6; return st->info->nb_decoded_frames >= 6;
else if(st->codec->has_b_frames<4)
return st->info->nb_decoded_frames >= 18;
else
return st->info->nb_decoded_frames >= 20; return st->info->nb_decoded_frames >= 20;
} }