Fix regression in r1406
authorYusuke Nakamura <muken.the.vfrmaniac@gmail.com>
Sat, 30 Jan 2010 21:53:01 +0000 (13:53 -0800)
committerJason Garrett-Glaser <darkshikari@gmail.com>
Sat, 30 Jan 2010 21:53:01 +0000 (13:53 -0800)
Bitrate was printed incorrectly for some input framerates.

x264.c

diff --git a/x264.c b/x264.c
index 7098b0f..58bc1f4 100644 (file)
--- a/x264.c
+++ b/x264.c
@@ -1458,7 +1458,7 @@ static int  Encode( x264_param_t *param, cli_opt_t *opt )
     int64_t second_largest_pts = -1;
     int64_t ticks_per_frame;
     double  duration;
-    int     prev_timebase_den = param->i_timebase_den;
+    int     prev_timebase_den = param->i_timebase_den / gcd( param->i_timebase_num, param->i_timebase_den );
     int     dts_compress_multiplier;
 
     opt->b_progress &= param->i_log_level < X264_LOG_DEBUG;