summaryrefslogtreecommitdiffstats
path: root/libavfilter
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2013-03-18 21:31:54 +0100
committerAnton Khirnov <anton@khirnov.net>2013-05-17 07:43:57 +0200
commit6592cd22a2307dbbeb621c7499ba81961e6face8 (patch)
tree92cbd8f561c7a5299d2aef57e9a7a9650822fd23 /libavfilter
parentd5c66d9c561283b4c9e862ce185fead8f27f37ce (diff)
downloadffmpeg-streaming-6592cd22a2307dbbeb621c7499ba81961e6face8.zip
ffmpeg-streaming-6592cd22a2307dbbeb621c7499ba81961e6face8.tar.gz
vf_crop: make config_props work properly when called multiple times.
Do not leak the x/y expressions.
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/vf_crop.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavfilter/vf_crop.c b/libavfilter/vf_crop.c
index bf9e85f..c039c45 100644
--- a/libavfilter/vf_crop.c
+++ b/libavfilter/vf_crop.c
@@ -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,
OpenPOWER on IntegriCloud