diff options
-rw-r--r-- | libavcodec/libaomenc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/libaomenc.c b/libavcodec/libaomenc.c index cb31c55825..17565017b4 100644 --- a/libavcodec/libaomenc.c +++ b/libavcodec/libaomenc.c @@ -504,7 +504,8 @@ static av_cold int aom_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(), 64); if (ctx->lag_in_frames >= 0) enccfg.g_lag_in_frames = ctx->lag_in_frames; |