avfilter/scale_eval: Use 64bit for factor_w/h

Avoids truncation and overflows

Fixes: #YWH-PGM40646-14
Found-by: An0n99X
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer
2026-01-07 03:05:34 +01:00
committed by Timo Rothenpieler
parent 23c8123d5b
commit 5bbc8f828e
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -116,7 +116,7 @@ int ff_scale_adjust_dimensions(AVFilterLink *inlink,
double w_adj)
{
int64_t w, h;
int factor_w, factor_h;
int64_t factor_w, factor_h;
w = *ret_w;
h = *ret_h;
+1 -1
View File
@@ -264,7 +264,7 @@ static int config_props(AVFilterLink *outlink)
double var_values[VARS_NB], res;
char *expr;
int ret;
int factor_w, factor_h;
int64_t factor_w, factor_h;
var_values[VAR_IN_W] = var_values[VAR_IW] = inlink->w;
var_values[VAR_IN_H] = var_values[VAR_IH] = inlink->h;