--- gst-plugins-base-0.10.10.1/gst/videorate/gstvideorate.c.leakfix	2007-04-23 17:25:13.000000000 -0400
+++ gst-plugins-base-0.10.10.1/gst/videorate/gstvideorate.c	2007-04-23 17:26:29.000000000 -0400
@@ -636,8 +636,10 @@
         count++;
 
         /* on error the _flush function posted a warning already */
-        if ((res = gst_video_rate_flush_prev (videorate)) != GST_FLOW_OK)
+        if ((res = gst_video_rate_flush_prev (videorate)) != GST_FLOW_OK) {
+          gst_buffer_unref (buffer);
           goto done;
+        }
       }
       /* continue while the first one was the best */
     }
