avfilter/vf_scale_vulkan: propagate ff_scale_adjust_dimensions() error

ff_scale_adjust_dimensions() can now return a negative error code when
the evaluated output dimensions are non-positive.  Check the return
value and fail fast instead of continuing with the unadjusted result.

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
This commit is contained in:
Jun Zhao
2026-04-28 06:14:38 +00:00
committed by Jun Zhao
co-authored by Jun Zhao
parent 3f9b92be42
commit 0929b6038c
+4 -2
View File
@@ -420,8 +420,10 @@ static int scale_vulkan_config_output(AVFilterLink *outlink)
if (err < 0)
return err;
ff_scale_adjust_dimensions(inlink, &vkctx->output_width, &vkctx->output_height,
SCALE_FORCE_OAR_DISABLE, 1, 1.f);
err = ff_scale_adjust_dimensions(inlink, &vkctx->output_width, &vkctx->output_height,
SCALE_FORCE_OAR_DISABLE, 1, 1.f);
if (err < 0)
return err;
outlink->w = vkctx->output_width;
outlink->h = vkctx->output_height;