Commit d19ca77f authored by Michael Niedermayer's avatar Michael Niedermayer

lavf: Fix fps misdetection when codec_info_duration is 0 and only a few frames...

lavf: Fix fps misdetection when codec_info_duration is 0 and only a few frames are used to estimate fps.
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 5f95c130
......@@ -2575,6 +2575,8 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
if(st->info->codec_info_duration && st->info->codec_info_duration*av_q2d(st->time_base) < (1001*12.0)/get_std_framerate(j))
continue;
if(!st->info->codec_info_duration && 1.0 < (1001*12.0)/get_std_framerate(j))
continue;
for(k=0; k<2; k++){
int n= st->info->duration_count;
double a= st->info->duration_error[k][0][j] / n;
......
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