1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-09-07 00:20:09 +02:00

make ff_rate_control_init() bail out if rc_strategy==1 and lavc wasn't

compiled with xvid support.

Originally committed as revision 5176 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Corey Hickey 2006-03-17 16:40:10 +00:00
parent 13c97a5a0a
commit 022fad4833

View File

@ -117,11 +117,15 @@ int ff_rate_control_init(MpegEncContext *s)
p= next;
}
#ifdef CONFIG_XVID
//FIXME maybe move to end
if((s->flags&CODEC_FLAG_PASS2) && s->avctx->rc_strategy == FF_RC_STRATEGY_XVID)
if((s->flags&CODEC_FLAG_PASS2) && s->avctx->rc_strategy == FF_RC_STRATEGY_XVID) {
#ifdef CONFIG_XVID
return ff_xvid_rate_control_init(s);
#else
av_log(s->avctx, AV_LOG_ERROR, "XviD ratecontrol requires libavcodec compiled with XviD support\n");
return -1;
#endif
}
if(init_pass2(s) < 0) return -1;
}