mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-06-19 19:03:00 +02: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:
@@ -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