Commit 903156aa authored by Karl Kiniger's avatar Karl Kiniger Committed by 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: 's avatarKarl Kiniger <karl.kiniger@med.ge.com>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent e24e5986
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment