summaryrefslogtreecommitdiff
path: root/libavfilter/vf_scale.c
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2014-12-17 15:19:43 +0100
committerVittorio Giovara <vittorio.giovara@gmail.com>2014-12-18 23:27:14 +0100
commit63be97ec403023fb664798432acedaf6e6922527 (patch)
treefaba23abd1d152d41b6d7c54617eea6d05a19d90 /libavfilter/vf_scale.c
parent9e06327ecb8f73c7904d10af7ad339c57cdaa788 (diff)
lavfi: always check av_expr_parse_and_eval() return value
CC: libav-stable@libav.org Bug-Id: CID 703624
Diffstat (limited to 'libavfilter/vf_scale.c')
-rw-r--r--libavfilter/vf_scale.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libavfilter/vf_scale.c b/libavfilter/vf_scale.c
index 73ea9d23e0..2b9e7e839b 100644
--- a/libavfilter/vf_scale.c
+++ b/libavfilter/vf_scale.c
@@ -177,9 +177,10 @@ static int config_props(AVFilterLink *outlink)
var_values[VAR_VSUB] = 1 << desc->log2_chroma_h;
/* evaluate width and height */
- av_expr_parse_and_eval(&res, (expr = scale->w_expr),
- var_names, var_values,
- NULL, NULL, NULL, NULL, NULL, 0, ctx);
+ 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;
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,