Commit d6b1248f authored by Chirag Lathia's avatar Chirag Lathia Committed by James Almer

avcodec/libvpxenc: Add a maximum constraint of 16 encoder threads.

Signed-off-by: 's avatarChirag Lathia <clathia@google.com>
Signed-off-by: 's avatarJames Almer <jamrial@gmail.com>
parent aecd63b9
......@@ -497,7 +497,8 @@ static av_cold int vpx_init(AVCodecContext *avctx,
enccfg.g_h = avctx->height;
enccfg.g_timebase.num = avctx->time_base.num;
enccfg.g_timebase.den = avctx->time_base.den;
enccfg.g_threads = avctx->thread_count ? avctx->thread_count : av_cpu_count();
enccfg.g_threads =
FFMIN(avctx->thread_count ? avctx->thread_count : av_cpu_count(), 16);
enccfg.g_lag_in_frames= ctx->lag_in_frames;
if (avctx->flags & AV_CODEC_FLAG_PASS1)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment