From: Jason Garrett-Glaser Date: Thu, 28 Jan 2010 03:41:27 +0000 (-0800) Subject: Fix implicit CBR message to only print when in ABR mode X-Git-Url: http://www.zmx.ovh/git.videolan.org/?a=commitdiff_plain;h=38cfabe33e17940870099fcf5d60daae080a3880;p=x264.git Fix implicit CBR message to only print when in ABR mode Also make it print outside of debug mode. --- diff --git a/encoder/ratecontrol.c b/encoder/ratecontrol.c index 746b17ad..53046165 100644 --- a/encoder/ratecontrol.c +++ b/encoder/ratecontrol.c @@ -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 &&