PR #22316 opened by Niklas Haas (haasn) URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/22316 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/22316.patch
The code was evidently designed at one point in time to support "direct" execution (not via a thread pool) for num_threads == 1, but this was never implemented. Just properly error out here. Signed-off-by: Niklas Haas <[email protected]> >From de0d1d95c110a7724a3edca8c52e1b68acc8dc12 Mon Sep 17 00:00:00 2001 From: Niklas Haas <[email protected]> Date: Fri, 27 Feb 2026 13:32:00 +0100 Subject: [PATCH] swscale/graph: correctly error out on slice thread init error The code was evidently designed at one point in time to support "direct" execution (not via a thread pool) for num_threads == 1, but this was never implemented. Just properly error out here. Signed-off-by: Niklas Haas <[email protected]> --- libswscale/graph.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/libswscale/graph.c b/libswscale/graph.c index 6a17a12496..2eaf7595f4 100644 --- a/libswscale/graph.c +++ b/libswscale/graph.c @@ -791,12 +791,9 @@ int ff_sws_graph_create(SwsContext *ctx, const SwsFormat *dst, const SwsFormat * ret = avpriv_slicethread_create(&graph->slicethread, (void *) graph, sws_graph_worker, NULL, ctx->threads); - if (ret == AVERROR(ENOSYS)) - graph->num_threads = 1; - else if (ret < 0) + if (ret < 0) goto error; - else - graph->num_threads = ret; + graph->num_threads = ret; ret = init_passes(graph); if (ret < 0) -- 2.52.0 _______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
