mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-06-11 08:13:06 +00:00
avfilter/vf_scale_vt: 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
8fc4cc982e
commit
3f9b92be42
@@ -248,8 +248,10 @@ static int scale_vt_config_output(AVFilterLink *outlink)
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
ff_scale_adjust_dimensions(inlink, &s->output_width, &s->output_height,
|
||||
SCALE_FORCE_OAR_DISABLE, 1, 1.f);
|
||||
err = ff_scale_adjust_dimensions(inlink, &s->output_width, &s->output_height,
|
||||
SCALE_FORCE_OAR_DISABLE, 1, 1.f);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
outlink->w = s->output_width;
|
||||
outlink->h = s->output_height;
|
||||
|
||||
Reference in New Issue
Block a user