vf_overlay: ensure the overlay frame does not get leaked.
authorAnton Khirnov <anton@khirnov.net>
Wed, 25 Jul 2012 06:42:26 +0000 (08:42 +0200)
committerLuca Barbato <lu_zero@gentoo.org>
Wed, 25 Jul 2012 22:01:04 +0000 (00:01 +0200)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
libavfilter/vf_overlay.c

index 5f3489505852ece4b3342f71f0e71d6e7a700e33..5a8da27a1692ad0267093677197da9ffb4367aa2 100644 (file)
@@ -239,6 +239,7 @@ static int start_frame_overlay(AVFilterLink *inlink, AVFilterBufferRef *inpicref
     OverlayContext *over = ctx->priv;
 
     inlink->cur_buf  = NULL;
+    avfilter_unref_bufferp(&over->overpicref);
     over->overpicref = inpicref;
     over->overpicref->pts = av_rescale_q(inpicref->pts, ctx->inputs[OVERLAY]->time_base,
                                          ctx->outputs[0]->time_base);