[gst-cvs] gstreamer: bin: relax the source element check

Wim Taymans wtay at kemper.freedesktop.org
Fri Aug 20 09:10:34 PDT 2010


Module: gstreamer
Branch: master
Commit: 57cc780c45a4c14decda0ac5fde58db3d13c7980
URL:    http://cgit.freedesktop.org/gstreamer/gstreamer/commit/?id=57cc780c45a4c14decda0ac5fde58db3d13c7980

Author: Wim Taymans <wim.taymans at collabora.co.uk>
Date:   Fri Aug 20 18:04:52 2010 +0200

bin: relax the source element check

When there is a sink inside a bin, the SINK flag is set on the bin. When we are
trying to iterate the source elements, also include the bins with the SINK flag
because they could also contain source elements, in which case they are also a
source.

This solves the case where sending an EOS to a pipeline didn't get dispatched to
all source elements.

See #625597

---

 gst/gstbin.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/gst/gstbin.c b/gst/gstbin.c
index 2019b9f..b825d4c 100644
--- a/gst/gstbin.c
+++ b/gst/gstbin.c
@@ -1641,10 +1641,11 @@ bin_element_is_src (GstElement * child, GstBin * bin)
   gboolean is_src = FALSE;
 
   /* we lock the child here for the remainder of the function to
-   * get its name and flag safely. */
+   * get its name and other info safely. */
   GST_OBJECT_LOCK (child);
-  if (!GST_OBJECT_FLAG_IS_SET (child, GST_ELEMENT_IS_SINK) &&
-      !child->numsinkpads) {
+  if (child->numsinkpads == 0) {
+    /* rough check.. We could improve this by checking if there are no sinkpad
+     * templates available. */
     is_src = TRUE;
   }
 





More information about the Gstreamer-commits mailing list