mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-28 20:53:54 +02:00
avcodec/libvpxenc: Add a maximum constraint of 16 encoder threads.
Signed-off-by: Chirag Lathia <clathia@google.com> Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
aecd63b926
commit
d6b1248fc6
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user