]> git.videolan.org Git - x264.git/commitdiff
Fix implicit CBR message to only print when in ABR mode
authorJason Garrett-Glaser <darkshikari@gmail.com>
Thu, 28 Jan 2010 03:41:27 +0000 (19:41 -0800)
committerJason Garrett-Glaser <darkshikari@gmail.com>
Sat, 30 Jan 2010 12:31:48 +0000 (04:31 -0800)
Also make it print outside of debug mode.

encoder/ratecontrol.c

index 746b17ad88080725f2f68dd22e2e1abaa89616e4..530461655186220b93b3e36239b7d2b171e1b8e9 100644 (file)
@@ -436,8 +436,16 @@ int x264_ratecontrol_new( x264_t *h )
         }
         else if( h->param.rc.i_vbv_max_bitrate == 0 )
         {
-            x264_log( h, X264_LOG_DEBUG, "VBV maxrate unspecified, assuming CBR\n" );
-            h->param.rc.i_vbv_max_bitrate = h->param.rc.i_bitrate;
+            if( h->param.rc.i_rc_method == X264_RC_ABR )
+            {
+                x264_log( h, X264_LOG_INFO, "VBV maxrate unspecified, assuming CBR\n" );
+                h->param.rc.i_vbv_max_bitrate = h->param.rc.i_bitrate;
+            }
+            else
+            {
+                x264_log( h, X264_LOG_INFO, "VBV bufsize set but maxrate unspecified, ignored\n" );
+                h->param.rc.i_vbv_buffer_size = 0;
+            }
         }
     }
     if( h->param.rc.i_vbv_max_bitrate < h->param.rc.i_bitrate &&