diff --git a/src/video_compress/libavcodec.cpp b/src/video_compress/libavcodec.cpp index 0b5559795..ec4707574 100644 --- a/src/video_compress/libavcodec.cpp +++ b/src/video_compress/libavcodec.cpp @@ -1692,8 +1692,10 @@ static void set_codec_thread_mode(AVCodecContext *codec_ctx, struct setparam_par if (req_thread_count != -1) { codec_ctx->thread_count = req_thread_count; } else if ((codec_ctx->codec->capabilities & AV_CODEC_CAP_OTHER_THREADS) != 0) { - // mainly for libvpx-vp9, libx264 has thread_count set implicitly to 0 (auto) - codec_ctx->thread_count = 0; + // do not enable MT for eg. libx265 - libx265 uses frame threads + if (strncmp(codec_ctx->codec->name, "libvpx", 6)) { + codec_ctx->thread_count = 0; + } } else if (codec_ctx->thread_type != 0) { codec_ctx->thread_count = thread::hardware_concurrency(); }