vf_overlay: prevent premature freeing of cur_buf
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 25 Jul 2012 06:42:25 +0000 (08:42 +0200)
committerLuca Barbato <lu_zero@gentoo.org>
Wed, 25 Jul 2012 22:01:04 +0000 (00:01 +0200)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
libavfilter/vf_overlay.c

index 14304c1..5f34895 100644 (file)
@@ -238,6 +238,7 @@ static int start_frame_overlay(AVFilterLink *inlink, AVFilterBufferRef *inpicref
     AVFilterContext *ctx = inlink->dst;
     OverlayContext *over = ctx->priv;
 
     AVFilterContext *ctx = inlink->dst;
     OverlayContext *over = ctx->priv;
 
+    inlink->cur_buf  = NULL;
     over->overpicref = inpicref;
     over->overpicref->pts = av_rescale_q(inpicref->pts, ctx->inputs[OVERLAY]->time_base,
                                          ctx->outputs[0]->time_base);
     over->overpicref = inpicref;
     over->overpicref->pts = av_rescale_q(inpicref->pts, ctx->inputs[OVERLAY]->time_base,
                                          ctx->outputs[0]->time_base);