summaryrefslogtreecommitdiff
path: root/libavfilter/vf_drawtext.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-05-17 11:28:15 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-05-17 11:29:22 +0200
commit71fcb6072ea6258b28e6267a3d7d5287569b2f26 (patch)
tree60e319e1c9bf07580a9a50194be7cf7758801154 /libavfilter/vf_drawtext.c
parentc7078f4907dcff6877cf38f48526788c10644f07 (diff)
parent3fb29588a27a711132106b924e27b53789a58dcb (diff)
Merge commit '3fb29588a27a711132106b924e27b53789a58dcb'
* commit '3fb29588a27a711132106b924e27b53789a58dcb': vf_drawtext: don't leak the expressions. vf_crop: make config_props work properly when called multiple times. vf_setdar: make config_props work properly when called multiple times. Conflicts: libavfilter/vf_aspect.c libavfilter/vf_drawtext.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/vf_drawtext.c')
-rw-r--r--libavfilter/vf_drawtext.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c
index 63c436242d..303dcfe26e 100644
--- a/libavfilter/vf_drawtext.c
+++ b/libavfilter/vf_drawtext.c
@@ -534,10 +534,10 @@ static av_cold void uninit(AVFilterContext *ctx)
{
DrawTextContext *s = ctx->priv;
- av_expr_free(s->x_pexpr); s->x_pexpr = NULL;
- av_expr_free(s->y_pexpr); s->y_pexpr = NULL;
- av_expr_free(s->draw_pexpr); s->draw_pexpr = NULL;
-
+ av_expr_free(s->x_pexpr);
+ av_expr_free(s->y_pexpr);
+ av_expr_free(s->draw_pexpr);
+ s->x_pexpr = s->y_pexpr = s->draw_pexpr = NULL;
av_freep(&s->positions);
s->nb_positions = 0;
@@ -580,6 +580,10 @@ static int config_input(AVFilterLink *inlink)
av_lfg_init(&s->prng, av_get_random_seed());
+ av_expr_free(s->x_pexpr);
+ av_expr_free(s->y_pexpr);
+ av_expr_free(s->draw_pexpr);
+ s->x_pexpr = s->y_pexpr = s->draw_pexpr = NULL;
if ((ret = av_expr_parse(&s->x_pexpr, s->x_expr, var_names,
NULL, NULL, fun2_names, fun2, 0, ctx)) < 0 ||
(ret = av_expr_parse(&s->y_pexpr, s->y_expr, var_names,