vf_select: avoid an unnecessary avfilter_ref_buffer().
authorAnton Khirnov <anton@khirnov.net>
Sun, 15 Jul 2012 09:00:49 +0000 (11:00 +0200)
committerAnton Khirnov <anton@khirnov.net>
Sun, 22 Jul 2012 07:14:05 +0000 (09:14 +0200)
libavfilter/vf_select.c

index d4cfbe9..b4a424e 100644 (file)
@@ -282,11 +282,10 @@ static int request_frame(AVFilterLink *outlink)
         int ret;
 
         av_fifo_generic_read(select->pending_frames, &picref, sizeof(picref), NULL);
-        if ((ret = ff_start_frame(outlink, avfilter_ref_buffer(picref, ~0))) < 0 ||
+        if ((ret = ff_start_frame(outlink, picref)) < 0 ||
             (ret = ff_draw_slice(outlink, 0, outlink->h, 1)) < 0 ||
             (ret = ff_end_frame(outlink)) < 0);
 
-        avfilter_unref_buffer(picref);
         return ret;
     }