libvpxenc: Fix "Additional information: g_lag_in_frames out of range [..25]"
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
5af7daabc4
commit
439e1d196b
@ -239,7 +239,8 @@ static av_cold int vp8_init(AVCodecContext *avctx)
|
|||||||
enccfg.g_timebase.den = avctx->time_base.den;
|
enccfg.g_timebase.den = avctx->time_base.den;
|
||||||
enccfg.g_threads = avctx->thread_count;
|
enccfg.g_threads = avctx->thread_count;
|
||||||
#if FF_API_X264_GLOBAL_OPTS
|
#if FF_API_X264_GLOBAL_OPTS
|
||||||
enccfg.g_lag_in_frames= FFMIN(avctx->rc_lookahead, 25); //0-25, avoids init failure
|
if(avctx->rc_lookahead >= 0)
|
||||||
|
enccfg.g_lag_in_frames= FFMIN(avctx->rc_lookahead, 25); //0-25, avoids init failure
|
||||||
if (ctx->lag_in_frames >= 0)
|
if (ctx->lag_in_frames >= 0)
|
||||||
enccfg.g_lag_in_frames = ctx->lag_in_frames;
|
enccfg.g_lag_in_frames = ctx->lag_in_frames;
|
||||||
#else
|
#else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user