From: Jason Garrett-Glaser Date: Mon, 15 Sep 2008 19:22:48 +0000 (-0700) Subject: Fix regression in b-adapt patch: encoder_open failed for multipass encodes without... X-Git-Url: http://www.zmx.ovh/git.videolan.org/?a=commitdiff_plain;h=f4736691f1052fbe32288a5fd87abce672c7b32f;p=x264.git Fix regression in b-adapt patch: encoder_open failed for multipass encodes without bframes. --- diff --git a/encoder/ratecontrol.c b/encoder/ratecontrol.c index 0b99e985..3251f4f5 100644 --- a/encoder/ratecontrol.c +++ b/encoder/ratecontrol.c @@ -400,7 +400,7 @@ int x264_ratecontrol_new( x264_t *h ) if( ( p = strstr( opts, "b_adapt=" ) ) && sscanf( p, "b_adapt=%d", &i ) && i >= X264_B_ADAPT_NONE && i <= X264_B_ADAPT_TRELLIS ) h->param.i_bframe_adaptive = i; - else + else if( h->param.i_bframe ) { x264_log( h, X264_LOG_ERROR, "b_adapt method specified in stats file not valid\n" ); return -1;