aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl Kiniger <karl.kiniger@med.ge.com>2014-10-11 22:34:11 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-11-01 13:28:13 +0100
commit71af22097d33b9133265977a113bc732bf42ede5 (patch)
treea7d02b9e80adcef36778c010c898ddc76c01a2b0
parentf3d34cff76819fe2514323bf7da6c446b0ce81ce (diff)
downloadffmpeg-71af22097d33b9133265977a113bc732bf42ede5.tar.gz
vf_drawtext: add missing clear of pointers after av_expr_free()
Fixes segfault when using sendcmd with drawtext. Since LIBAVFILTER_VERSION_MAJOR 5 FF_API_DRAWTEXT_OLD_TIMELINE evaluates to 0. Signed-off-by: Karl Kiniger <karl.kiniger@med.ge.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 903156aa8a352a5df34cd1e34c21b2193a447d5e) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavfilter/vf_drawtext.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c
index 4fbb6c08d6..5b725d69b0 100644
--- a/libavfilter/vf_drawtext.c
+++ b/libavfilter/vf_drawtext.c
@@ -716,6 +716,8 @@ static av_cold void uninit(AVFilterContext *ctx)
#if FF_API_DRAWTEXT_OLD_TIMELINE
av_expr_free(s->draw_pexpr);
s->x_pexpr = s->y_pexpr = s->draw_pexpr = NULL;
+#else
+ s->x_pexpr = s->y_pexpr = NULL;
#endif
av_freep(&s->positions);
s->nb_positions = 0;