summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ed18cef)
raw | patch | inline | side by side (parent: ed18cef)
author | Edward Hervey <bilboed@bilboed.com> | |
Mon, 29 Jun 2009 09:26:57 +0000 (11:26 +0200) | ||
committer | Edward Hervey <bilboed@bilboed.com> | |
Sun, 5 Jul 2009 19:24:42 +0000 (21:24 +0200) |
This guarantees that only one FLUSH_STOP event (the last one) will be sent
downstream when a flushing seek is being done through collectpads.
downstream when a flushing seek is being done through collectpads.
libs/gst/base/gstcollectpads.c | patch | blob | history |
index c8b7aaf8c620ea0357a25de8ece552801e3a8180..c1a21f28bca41959da57cc413149c963e8e1d4c7 100644 (file)
return GST_FLOW_NOT_SUPPORTED;
}
+static gboolean
+gst_collect_pads_is_flushing (GstCollectPads * pads)
+{
+ GSList *walk = pads->data;
+ gboolean res = TRUE;
+
+ GST_COLLECT_PADS_PAD_LOCK (pads);
+ while (walk) {
+ GstCollectData *cdata = walk->data;
+
+ if (cdata->abidata.ABI.flushing)
+ goto done;
+ walk = g_slist_next (walk);
+ }
+
+ res = FALSE;
+done:
+ GST_COLLECT_PADS_PAD_UNLOCK (pads);
+ return res;
+}
+
/* FIXME, I think this function is used to work around bad behaviour
* of elements that add pads to themselves without activating them.
*
}
GST_OBJECT_UNLOCK (pads);
- /* forward event */
- goto forward;
+ if (!gst_collect_pads_is_flushing (pads))
+ /* forward event if all pads are no longer flushing */
+ goto forward;
+ gst_event_unref (event);
+ goto done;
}
case GST_EVENT_EOS:
{