[FFmpeg-cvslog] vf_gradfun: don't store two pointers to one AVFilterBufferRef.

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


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

vf_gradfun: don't store two pointers to one AVFilterBufferRef.

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

 libavfilter/vf_gradfun.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/libavfilter/vf_gradfun.c b/libavfilter/vf_gradfun.c
index 71749fe..735bd50 100644
--- a/libavfilter/vf_gradfun.c
+++ b/libavfilter/vf_gradfun.c
@@ -191,7 +191,7 @@ static void start_frame(AVFilterLink *inlink, AVFilterBufferRef *inpicref)
         outpicref->video->w = outlink->w;
         outpicref->video->h = outlink->h;
     } else
-        outpicref = inpicref;
+        outpicref = avfilter_ref_buffer(inpicref, ~0);
 
     outlink->out_buf = outpicref;
     ff_start_frame(outlink, avfilter_ref_buffer(outpicref, ~0));
@@ -226,8 +226,7 @@ static void end_frame(AVFilterLink *inlink)
     ff_draw_slice(outlink, 0, inlink->h, 1);
     ff_end_frame(outlink);
     avfilter_unref_buffer(inpic);
-    if (outpic != inpic)
-        avfilter_unref_buffer(outpic);
+    avfilter_unref_buffer(outpic);
 }
 
 AVFilter avfilter_vf_gradfun = {



More information about the ffmpeg-cvslog mailing list