From d6f2e4cafe2f88e1fa4e14715ef2ea9052168619 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Tue, 30 Jun 2026 09:44:09 +0400 Subject: [PATCH] Simplify the use of new ffmpeg thread option --- Telegram/SourceFiles/ffmpeg/ffmpeg_utility.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Telegram/SourceFiles/ffmpeg/ffmpeg_utility.cpp b/Telegram/SourceFiles/ffmpeg/ffmpeg_utility.cpp index 1dcff5cb4b..277c1bbb83 100644 --- a/Telegram/SourceFiles/ffmpeg/ffmpeg_utility.cpp +++ b/Telegram/SourceFiles/ffmpeg/ffmpeg_utility.cpp @@ -465,12 +465,10 @@ CodecPointer MakeCodecPointer(CodecDescriptor descriptor) { descriptor.videoMaxArea); } if (OptionFFmpegMultiThread.value()) { - av_opt_set( + av_opt_set_int( context, "threads", - (OptionFFmpegThreadCount.value() > 0) - ? std::to_string(OptionFFmpegThreadCount.value()).c_str() - : "auto", + OptionFFmpegThreadCount.value(), 0); } av_opt_set_int(context, "refcounted_frames", 1, 0);