[FFmpeg-cvslog] avformat/utils: Simplify get_std_framerate() check

Michael Niedermayer git at videolan.org
Mon Jun 1 04:39:33 CEST 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Jun  1 04:05:04 2015 +0200| [1e0c34fe71ae12667de0ea7c373ea16ae128a71f] | committer: Michael Niedermayer

avformat/utils: Simplify get_std_framerate() check

This also avoids using a floating point operation

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1e0c34fe71ae12667de0ea7c373ea16ae128a71f
---

 libavformat/utils.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index 7af2aab..c07bae2 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -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))



More information about the ffmpeg-cvslog mailing list