Ver código fonte

avfilter/drawtext: fix memory leak when using "reinit" runtime command

Free AVOption in drawtext private context when freeing old copy of drawtext
private context during processing of "reinit" runtime command.

Signed-off-by: Steven Zhou <steven.zhou@netint.ca>
Signed-off-by: James Almer <jamrial@gmail.com>
Steven Zhou 1 ano atrás
pai
commit
d1fa9cf4b4
1 arquivos alterados com 1 adições e 0 exclusões
  1. 1 0
      libavfilter/vf_drawtext.c

+ 1 - 0
libavfilter/vf_drawtext.c

@@ -1226,6 +1226,7 @@ static int command(AVFilterContext *ctx, const char *cmd, const char *arg, char
 
         ctx->priv = old;
         uninit(ctx);
+        av_opt_free(old);
         av_freep(&old);
 
         ctx->priv = new;