[FFmpeg-cvslog] libvpxenc: Fix "Additional information: g_lag_in_frames out of range [..25] "
Michael Niedermayer
git at videolan.org
Sun Nov 6 00:13:01 CET 2011
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Nov 5 23:21:31 2011 +0100| [439e1d196b26847dd0bfebf143918dd04552bd04] | committer: Michael Niedermayer
libvpxenc: Fix "Additional information: g_lag_in_frames out of range [..25]"
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=439e1d196b26847dd0bfebf143918dd04552bd04
---
libavcodec/libvpxenc.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c
index 1a92283..bb43c01 100644
--- a/libavcodec/libvpxenc.c
+++ b/libavcodec/libvpxenc.c
@@ -239,7 +239,8 @@ static av_cold int vp8_init(AVCodecContext *avctx)
enccfg.g_timebase.den = avctx->time_base.den;
enccfg.g_threads = avctx->thread_count;
#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)
enccfg.g_lag_in_frames = ctx->lag_in_frames;
#else
More information about the ffmpeg-cvslog
mailing list