diff --git a/src/video_compress/libavcodec.cpp b/src/video_compress/libavcodec.cpp index 5cd20aeea..81fd32619 100644 --- a/src/video_compress/libavcodec.cpp +++ b/src/video_compress/libavcodec.cpp @@ -1562,11 +1562,12 @@ static void set_codec_thread_mode(AVCodecContext *codec_ctx, struct setparam_par codec_ctx->thread_count = req_thread_count; } else if ((codec_ctx->codec->capabilities & AV_CODEC_CAP_OTHER_THREADS) != 0) { // do not enable MT for eg. libx265 - libx265 uses frame threads - if (strncmp(codec_ctx->codec->name, "libvpx", 6) == 0) { - codec_ctx->thread_count = 0; - } else if (strcmp(codec_ctx->codec->name, "libaom-av1") == 0 || + if (strcmp(codec_ctx->codec->name, "libaom-av1") == 0 || strcmp(codec_ctx->codec->name, "librav1e") == 0) { codec_ctx->thread_count = thread::hardware_concurrency(); + } else if (strstr(codec_ctx->codec->name, "libx26") != + codec_ctx->codec->name) { + codec_ctx->thread_count = 0; } } else if (codec_ctx->thread_type != 0) { codec_ctx->thread_count = thread::hardware_concurrency();