From 38cfabe33e17940870099fcf5d60daae080a3880 Mon Sep 17 00:00:00 2001 From: Jason Garrett-Glaser Date: Wed, 27 Jan 2010 19:41:27 -0800 Subject: [PATCH] Fix implicit CBR message to only print when in ABR mode Also make it print outside of debug mode. --- encoder/ratecontrol.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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 && -- 2.47.3