[FFmpeg-cvslog] vf_overlay: don't access a buffer reference that's been given away.

Anton Khirnov git at videolan.org
Sat Jul 21 22:32:08 CEST 2012


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Sun Jul  8 05:34:20 2012 +0200| [ad8b6326aa00b87a87814d11707adf31ad2eaf28] | committer: Anton Khirnov

vf_overlay: don't access a buffer reference that's been given away.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ad8b6326aa00b87a87814d11707adf31ad2eaf28
---

 libavfilter/vf_overlay.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libavfilter/vf_overlay.c b/libavfilter/vf_overlay.c
index 9852853..b9d64b9 100644
--- a/libavfilter/vf_overlay.c
+++ b/libavfilter/vf_overlay.c
@@ -214,7 +214,6 @@ static void start_frame(AVFilterLink *inlink, AVFilterBufferRef *inpicref)
     AVFilterContext *ctx = inlink->dst;
     OverlayContext *over = ctx->priv;
 
-    inlink->dst->outputs[0]->out_buf = outpicref;
     outpicref->pts = av_rescale_q(outpicref->pts, ctx->inputs[MAIN]->time_base,
                                   ctx->outputs[0]->time_base);
 
@@ -324,7 +323,7 @@ static void draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir)
 {
     AVFilterContext *ctx = inlink->dst;
     AVFilterLink *outlink = ctx->outputs[0];
-    AVFilterBufferRef *outpicref = outlink->out_buf;
+    AVFilterBufferRef *outpicref = inlink->cur_buf;
     OverlayContext *over = ctx->priv;
 
     if (over->overpicref &&



More information about the ffmpeg-cvslog mailing list