avformat/utils: Simplify get_std_framerate() check
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 1 Jun 2015 02:05:04 +0000 (04:05 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 1 Jun 2015 02:31:37 +0000 (04:31 +0200)
This also avoids using a floating point operation

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/utils.c

index 7af2aab..c07bae2 100644 (file)
@@ -2981,7 +2981,7 @@ void ff_rfps_calculate(AVFormatContext *ic)
 
                 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))
+                if (!st->info->codec_info_duration && get_std_framerate(j) < 1001*12)
                     continue;
 
                 if (av_q2d(st->time_base) * st->info->rfps_duration_sum / st->info->duration_count < (1001*12.0 * 0.8)/get_std_framerate(j))