Simplify the use of new ffmpeg thread option

This commit is contained in:
Ilya Fedin
2026-06-30 09:44:09 +04:00
committed by John Preston
parent 734d709522
commit d6f2e4cafe
@@ -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);