mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-06-11 08:13:06 +00:00
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:
committed by
Jun Zhao
co-authored by
Jun Zhao
parent
3f9b92be42
commit
0929b6038c
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user