Browse Source

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>
tags/n2.5
Karl Kiniger Michael Niedermayer 11 years ago
parent
commit
903156aa8a
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavfilter/vf_drawtext.c

+ 2
- 0
libavfilter/vf_drawtext.c View File

@@ -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;


Loading…
Cancel
Save