1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

vf_crop: make config_props work properly when called multiple times.

Do not leak the x/y expressions.
This commit is contained in:
Anton Khirnov 2013-03-18 21:31:54 +01:00
parent d5c66d9c56
commit 6592cd22a2

View File

@ -193,6 +193,9 @@ static int config_input(AVFilterLink *link)
s->w &= ~((1 << s->hsub) - 1);
s->h &= ~((1 << s->vsub) - 1);
av_expr_free(s->x_pexpr);
av_expr_free(s->y_pexpr);
s->x_pexpr = s->y_pexpr = NULL;
if ((ret = av_expr_parse(&s->x_pexpr, s->x_expr, var_names,
NULL, NULL, NULL, NULL, 0, ctx)) < 0 ||
(ret = av_expr_parse(&s->y_pexpr, s->y_expr, var_names,