mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-06-11 08:13:06 +00:00
avfilter/vf_scale_d3d12: 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
0929b6038c
commit
4fc0b36bac
@@ -619,7 +619,9 @@ static int scale_d3d12_config_props(AVFilterLink *outlink)
|
||||
}
|
||||
|
||||
/* Adjust dimensions to meet codec/hardware alignment requirements */
|
||||
ff_scale_adjust_dimensions(inlink, &s->width, &s->height, 0, 1, 1.f);
|
||||
ret = ff_scale_adjust_dimensions(inlink, &s->width, &s->height, 0, 1, 1.f);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
outlink->w = s->width;
|
||||
outlink->h = s->height;
|
||||
|
||||
Reference in New Issue
Block a user