diff options
author | Corey Hickey <bugfood-ml@fatooh.org> | 2006-03-17 16:40:10 +0000 |
---|---|---|
committer | Corey Hickey <bugfood-ml@fatooh.org> | 2006-03-17 16:40:10 +0000 |
commit | 022fad483385f446f1efd0867b6fbaa858198719 (patch) | |
tree | 08c4ebf55a20e3ab173b6701f151f5c8c26bcd11 /libavcodec/ratecontrol.c | |
parent | 13c97a5a0aa7313867b24778a6cb3d94771649c2 (diff) | |
download | ffmpeg-streaming-022fad483385f446f1efd0867b6fbaa858198719.zip ffmpeg-streaming-022fad483385f446f1efd0867b6fbaa858198719.tar.gz |
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
Diffstat (limited to 'libavcodec/ratecontrol.c')
-rw-r--r-- | libavcodec/ratecontrol.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libavcodec/ratecontrol.c b/libavcodec/ratecontrol.c index 29dc1f4..a6f8036 100644 --- a/libavcodec/ratecontrol.c +++ b/libavcodec/ratecontrol.c @@ -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; } |