[FFmpeg-cvslog] vf_drawtext: add missing clear of pointers after av_expr_free()
Karl Kiniger
git at videolan.org
Sat Oct 11 23:34:46 CEST 2014
ffmpeg | branch: master | Karl Kiniger <karl.kiniger at med.ge.com> | Sat Oct 11 22:34:11 2014 +0200| [903156aa8a352a5df34cd1e34c21b2193a447d5e] | committer: Michael Niedermayer
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 at med.ge.com>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=903156aa8a352a5df34cd1e34c21b2193a447d5e
---
libavfilter/vf_drawtext.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c
index 4fbb6c0..5b725d6 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;
More information about the ffmpeg-cvslog
mailing list