collectpads: Call the collected function while it returns FLOW_OK
authorThibault Saunier <thibault.saunier@collabora.com>
Wed, 9 Oct 2013 18:36:48 +0000 (15:36 -0300)
committerThibault Saunier <thibault.saunier@collabora.com>
Wed, 9 Oct 2013 23:29:02 +0000 (20:29 -0300)
This allows us to make sure the elements is EOS and does not have
remaining buffers to be drained.

https://bugzilla.gnome.org/show_bug.cgi?id=709637

libs/gst/base/gstcollectpads.c

index 3d69abd..799835a 100644 (file)
@@ -1284,7 +1284,9 @@ gst_collect_pads_check_collected (GstCollectPads * pads)
     GST_DEBUG_OBJECT (pads, "All active pads (%d) are EOS, calling %s",
         pads->priv->numpads, GST_DEBUG_FUNCPTR_NAME (func));
 
-    flow_ret = func (pads, user_data);
+    do {
+      flow_ret = func (pads, user_data);
+    } while (flow_ret == GST_FLOW_OK);
   } else {
     gboolean collected = FALSE;