Commit c9678600 authored by Stefano Sabatini's avatar Stefano Sabatini

scale: set evaluated value for the "out_w" and "out_h" constants

The constant values were never set, thus the evaluation of expressions
referencing those constants were resulting in an error.
Signed-off-by: 's avatarStefano Sabatini <stefano.sabatini-lala@poste.it>
parent e93d3334
...@@ -165,12 +165,12 @@ static int config_props(AVFilterLink *outlink) ...@@ -165,12 +165,12 @@ static int config_props(AVFilterLink *outlink)
av_expr_parse_and_eval(&res, (expr = scale->w_expr), av_expr_parse_and_eval(&res, (expr = scale->w_expr),
var_names, var_values, var_names, var_values,
NULL, NULL, NULL, NULL, NULL, 0, ctx); NULL, NULL, NULL, NULL, NULL, 0, ctx);
scale->w = var_values[VAR_OW] = res; scale->w = var_values[VAR_OUT_W] = var_values[VAR_OW] = res;
if ((ret = av_expr_parse_and_eval(&res, (expr = scale->h_expr), if ((ret = av_expr_parse_and_eval(&res, (expr = scale->h_expr),
var_names, var_values, var_names, var_values,
NULL, NULL, NULL, NULL, NULL, 0, ctx)) < 0) NULL, NULL, NULL, NULL, NULL, 0, ctx)) < 0)
goto fail; goto fail;
scale->h = var_values[VAR_OH] = res; scale->h = var_values[VAR_OUT_H] = var_values[VAR_OH] = res;
/* evaluate again the width, as it may depend on the output height */ /* evaluate again the width, as it may depend on the output height */
if ((ret = av_expr_parse_and_eval(&res, (expr = scale->w_expr), if ((ret = av_expr_parse_and_eval(&res, (expr = scale->w_expr),
var_names, var_values, var_names, var_values,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment