Skip to content
Snippets Groups Projects
Commit b06848f4 authored by Anton Khirnov's avatar Anton Khirnov
Browse files

vf_lut: make config_props work properly when called multiple times.

Do not leak the expressions.
parent 1232a164
No related branches found
No related tags found
No related merge requests found
...@@ -245,6 +245,8 @@ static int config_props(AVFilterLink *inlink) ...@@ -245,6 +245,8 @@ static int config_props(AVFilterLink *inlink)
double res; double res;
/* create the parsed expression */ /* create the parsed expression */
av_expr_free(s->comp_expr[comp]);
s->comp_expr[comp] = NULL;
ret = av_expr_parse(&s->comp_expr[comp], s->comp_expr_str[comp], ret = av_expr_parse(&s->comp_expr[comp], s->comp_expr_str[comp],
var_names, funcs1_names, funcs1, NULL, NULL, 0, ctx); var_names, funcs1_names, funcs1, NULL, NULL, 0, ctx);
if (ret < 0) { if (ret < 0) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment