diff options
author | Anton Khirnov <anton@khirnov.net> | 2015-05-02 09:09:52 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2015-05-05 21:41:52 +0200 |
commit | 8b86c2ed2eb29dce137b26e66a9bddd50f72817f (patch) | |
tree | c18e1653eaeec39db7c7f1ae9eee8c9e5f5debc8 | |
parent | 378ee3bad5b99e8f90864af9bc851590e0f64825 (diff) | |
download | ffmpeg-8b86c2ed2eb29dce137b26e66a9bddd50f72817f.tar.gz |
Revert "lavfi: always check av_expr_parse_and_eval() return value"
This reverts commit 63be97ec403023fb664798432acedaf6e6922527.
All those calls were unchecked on purpose, as explained in the comments
in the code.
(cherry picked from commit 3735b5c616770429572f86aabdaec39c6ebb8818)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
-rw-r--r-- | libavfilter/vf_pad.c | 14 | ||||
-rw-r--r-- | libavfilter/vf_scale.c | 7 |
2 files changed, 9 insertions, 12 deletions
diff --git a/libavfilter/vf_pad.c b/libavfilter/vf_pad.c index bacb5051e1..634af4c941 100644 --- a/libavfilter/vf_pad.c +++ b/libavfilter/vf_pad.c @@ -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, diff --git a/libavfilter/vf_scale.c b/libavfilter/vf_scale.c index 2b9e7e839b..73ea9d23e0 100644 --- a/libavfilter/vf_scale.c +++ b/libavfilter/vf_scale.c @@ -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, |