This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 57541f5f417c144540dc78bc7213d0bbff9811ce Author: Niklas Haas <[email protected]> AuthorDate: Wed Jun 3 21:29:23 2026 +0200 Commit: Niklas Haas <[email protected]> CommitDate: Wed Jun 3 21:39:55 2026 +0000 swscale/graph: move legacy fallback out of add_convert_pass() Signed-off-by: Niklas Haas <[email protected]> --- libswscale/graph.c | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/libswscale/graph.c b/libswscale/graph.c index a5547de44d..941ef1cb8a 100644 --- a/libswscale/graph.c +++ b/libswscale/graph.c @@ -622,13 +622,12 @@ static int add_legacy_sws_pass(SwsGraph *graph, const SwsFormat *src, * Format conversion and scaling * *********************************/ -#if CONFIG_UNSTABLE -static int add_convert_pass(SwsGraph *graph, const SwsFormat *src, - const SwsFormat *dst, SwsPass *input, - SwsPass **output) +static int add_ops_convert_pass(SwsGraph *graph, const SwsFormat *src, + const SwsFormat *dst, SwsPass *input, + SwsPass **output) { +#if CONFIG_UNSTABLE SwsContext *ctx = graph->ctx; - int ret = AVERROR(ENOTSUP); /* Preemptively skip the ops list generation if the backend was * constrained to the legacy implementation only. This would @@ -636,12 +635,12 @@ static int add_convert_pass(SwsGraph *graph, const SwsFormat *src, * error, but this way saves a bit of unnecessary overhead */ const SwsBackend backends = ff_sws_enabled_backends(ctx); if (backends == SWS_BACKEND_LEGACY) - goto fail; + return AVERROR(ENOTSUP); SwsOpList *ops; - ret = ff_sws_op_list_generate(ctx, src, dst, &ops, &graph->incomplete); + int ret = ff_sws_op_list_generate(ctx, src, dst, &ops, &graph->incomplete); if (ret < 0) - goto fail; + return ret; av_log(ctx, AV_LOG_VERBOSE, "Conversion pass for %s -> %s:\n", av_get_pix_fmt_name(src->format), av_get_pix_fmt_name(dst->format)); @@ -649,22 +648,24 @@ static int add_convert_pass(SwsGraph *graph, const SwsFormat *src, av_log(ctx, AV_LOG_DEBUG, "Unoptimized operation list:\n"); ff_sws_op_list_print(ctx, AV_LOG_DEBUG, AV_LOG_TRACE, ops); - ret = ff_sws_compile_pass(graph, NULL, &ops, SWS_OP_FLAG_OPTIMIZE, input, output); - if (ret < 0) - goto fail; + return ff_sws_compile_pass(graph, NULL, &ops, SWS_OP_FLAG_OPTIMIZE, input, output); +#else + return AVERROR(ENOTSUP); +#endif +} - ret = 0; - /* fall through */ +static int add_convert_pass(SwsGraph *graph, const SwsFormat *src, + const SwsFormat *dst, SwsPass *input, + SwsPass **output) +{ + int ret; -fail: + ret = add_ops_convert_pass(graph, src, dst, input, output); if (ret == AVERROR(ENOTSUP)) - return add_legacy_sws_pass(graph, src, dst, input, output); + ret = add_legacy_sws_pass(graph, src, dst, input, output); + return ret; } -#else -#define add_convert_pass add_legacy_sws_pass -#endif - /************************** * Gamut and tone mapping * _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
