Commit 3735b5c6 authored by Anton Khirnov's avatar Anton Khirnov

Revert "lavfi: always check av_expr_parse_and_eval() return value"

This reverts commit 63be97ec.

All those calls were unchecked on purpose, as explained in the comments
in the code.
parent 60f1cc4a
...@@ -158,10 +158,9 @@ static int config_input(AVFilterLink *inlink) ...@@ -158,10 +158,9 @@ static int config_input(AVFilterLink *inlink)
var_values[VAR_VSUB] = 1<<s->vsub; var_values[VAR_VSUB] = 1<<s->vsub;
/* evaluate width and height */ /* evaluate width and height */
if ((ret = av_expr_parse_and_eval(&res, (expr = s->w_expr), av_expr_parse_and_eval(&res, (expr = s->w_expr),
var_names, var_values, var_names, var_values,
NULL, NULL, NULL, NULL, NULL, 0, ctx)) < 0) NULL, NULL, NULL, NULL, NULL, 0, ctx);
goto eval_fail;
s->w = var_values[VAR_OUT_W] = var_values[VAR_OW] = res; s->w = var_values[VAR_OUT_W] = var_values[VAR_OW] = res;
if ((ret = av_expr_parse_and_eval(&res, (expr = s->h_expr), if ((ret = av_expr_parse_and_eval(&res, (expr = s->h_expr),
var_names, var_values, var_names, var_values,
...@@ -176,10 +175,9 @@ static int config_input(AVFilterLink *inlink) ...@@ -176,10 +175,9 @@ static int config_input(AVFilterLink *inlink)
s->w = var_values[VAR_OUT_W] = var_values[VAR_OW] = res; s->w = var_values[VAR_OUT_W] = var_values[VAR_OW] = res;
/* evaluate x and y */ /* evaluate x and y */
if ((ret = av_expr_parse_and_eval(&res, (expr = s->x_expr), av_expr_parse_and_eval(&res, (expr = s->x_expr),
var_names, var_values, var_names, var_values,
NULL, NULL, NULL, NULL, NULL, 0, ctx)) < 0) NULL, NULL, NULL, NULL, NULL, 0, ctx);
goto eval_fail;
s->x = var_values[VAR_X] = res; s->x = var_values[VAR_X] = res;
if ((ret = av_expr_parse_and_eval(&res, (expr = s->y_expr), if ((ret = av_expr_parse_and_eval(&res, (expr = s->y_expr),
var_names, var_values, var_names, var_values,
......
...@@ -177,10 +177,9 @@ static int config_props(AVFilterLink *outlink) ...@@ -177,10 +177,9 @@ static int config_props(AVFilterLink *outlink)
var_values[VAR_VSUB] = 1 << desc->log2_chroma_h; var_values[VAR_VSUB] = 1 << desc->log2_chroma_h;
/* evaluate width and height */ /* evaluate width and height */
if ((ret = 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)) < 0) NULL, NULL, NULL, NULL, NULL, 0, ctx);
goto fail;
scale->w = var_values[VAR_OUT_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,
......
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