Browse Source

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

This reverts commit 63be97ec40.

All those calls were unchecked on purpose, as explained in the comments
in the code.
tags/n2.7
Anton Khirnov 10 years ago
parent
commit
3735b5c616
2 changed files with 9 additions and 12 deletions
  1. +6
    -8
      libavfilter/vf_pad.c
  2. +3
    -4
      libavfilter/vf_scale.c

+ 6
- 8
libavfilter/vf_pad.c View File

@@ -158,10 +158,9 @@ static int config_input(AVFilterLink *inlink)
var_values[VAR_VSUB] = 1<<s->vsub;

/* evaluate width and height */
if ((ret = av_expr_parse_and_eval(&res, (expr = s->w_expr),
var_names, var_values,
NULL, NULL, NULL, NULL, NULL, 0, ctx)) < 0)
goto eval_fail;
av_expr_parse_and_eval(&res, (expr = s->w_expr),
var_names, var_values,
NULL, NULL, NULL, NULL, NULL, 0, ctx);
s->w = var_values[VAR_OUT_W] = var_values[VAR_OW] = res;
if ((ret = av_expr_parse_and_eval(&res, (expr = s->h_expr),
var_names, var_values,
@@ -176,10 +175,9 @@ static int config_input(AVFilterLink *inlink)
s->w = var_values[VAR_OUT_W] = var_values[VAR_OW] = res;

/* evaluate x and y */
if ((ret = av_expr_parse_and_eval(&res, (expr = s->x_expr),
var_names, var_values,
NULL, NULL, NULL, NULL, NULL, 0, ctx)) < 0)
goto eval_fail;
av_expr_parse_and_eval(&res, (expr = s->x_expr),
var_names, var_values,
NULL, NULL, NULL, NULL, NULL, 0, ctx);
s->x = var_values[VAR_X] = res;
if ((ret = av_expr_parse_and_eval(&res, (expr = s->y_expr),
var_names, var_values,


+ 3
- 4
libavfilter/vf_scale.c View File

@@ -177,10 +177,9 @@ static int config_props(AVFilterLink *outlink)
var_values[VAR_VSUB] = 1 << desc->log2_chroma_h;

/* evaluate width and height */
if ((ret = av_expr_parse_and_eval(&res, (expr = scale->w_expr),
var_names, var_values,
NULL, NULL, NULL, NULL, NULL, 0, ctx)) < 0)
goto fail;
av_expr_parse_and_eval(&res, (expr = scale->w_expr),
var_names, var_values,
NULL, NULL, NULL, NULL, NULL, 0, ctx);
scale->w = var_values[VAR_OUT_W] = var_values[VAR_OW] = res;
if ((ret = av_expr_parse_and_eval(&res, (expr = scale->h_expr),
var_names, var_values,


Loading…
Cancel
Save