vf_overlay: prevent premature freeing of cur_buf
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 21 Jul 2012 20:00:10 +0000 (22:00 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 21 Jul 2012 20:17:57 +0000 (22:17 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavfilter/vf_overlay.c

index 0ce344b..6736b06 100644 (file)
@@ -560,6 +560,7 @@ static void end_frame_over(AVFilterLink *inlink)
     AVFilterContext *ctx = inlink->dst;
     OverlayContext *over = ctx->priv;
     AVFilterBufferRef *inpicref = inlink->cur_buf;
+    inlink->cur_buf = NULL;
 
     flush_frames(ctx);
     inpicref->pts = av_rescale_q(inpicref->pts, ctx->inputs[OVERLAY]->time_base,