mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-24 03:39:45 +00:00
lavfi: always check av_expr_parse_and_eval() return value
CC: libav-stable@libav.org Bug-Id: CID 703624
This commit is contained in:
parent
9e06327ecb
commit
63be97ec40
@ -158,9 +158,10 @@ static int config_input(AVFilterLink *inlink)
|
||||
var_values[VAR_VSUB] = 1<<s->vsub;
|
||||
|
||||
/* evaluate width and height */
|
||||
av_expr_parse_and_eval(&res, (expr = s->w_expr),
|
||||
var_names, var_values,
|
||||
NULL, NULL, NULL, NULL, NULL, 0, ctx);
|
||||
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;
|
||||
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,
|
||||
@ -175,9 +176,10 @@ static int config_input(AVFilterLink *inlink)
|
||||
s->w = var_values[VAR_OUT_W] = var_values[VAR_OW] = res;
|
||||
|
||||
/* evaluate x and y */
|
||||
av_expr_parse_and_eval(&res, (expr = s->x_expr),
|
||||
var_names, var_values,
|
||||
NULL, NULL, NULL, NULL, NULL, 0, ctx);
|
||||
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;
|
||||
s->x = var_values[VAR_X] = res;
|
||||
if ((ret = av_expr_parse_and_eval(&res, (expr = s->y_expr),
|
||||
var_names, var_values,
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user