Index: libs/gst/base/gstcollectpads.c
===================================================================
--- libs/gst/base/gstcollectpads.c	(revision 13)
+++ libs/gst/base/gstcollectpads.c	(revision 19)
@@ -620,6 +620,28 @@
       GST_DEBUG_PAD_NAME (data->pad));
 
   switch (GST_EVENT_TYPE (event)) {
+    case GST_EVENT_FLUSH_START:
+    {
+      /* forward event to unblock is_collected */
+      gst_pad_event_default (pad, event);
+
+      /* now unblock the chain function
+      no cond per pad, so they all unblock, a bit tricky */
+      gst_collect_pads_stop (pads);
+
+      /* event already cleaned up by forwarding */
+      return TRUE;
+    }
+    case GST_EVENT_FLUSH_STOP:
+    {
+      /* global start, so all pads start */
+      gst_collect_pads_start (pads);
+      /* flush the 1 buffer queue */
+      GST_OBJECT_LOCK (pads);
+      gst_collect_pads_pop (pads, data);
+      GST_OBJECT_UNLOCK (pads);
+      goto beach;
+    }
     case GST_EVENT_EOS:
     {
       GST_OBJECT_LOCK (pads);
