]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - glsdk/gstreamer0-10.git/commitdiff
gst/gstbin.c (gst_bin_change_state): Fix state changes if a bin has no sinks.
authorAndy Wingo <wingo@pobox.com>
Sat, 14 May 2005 15:54:49 +0000 (15:54 +0000)
committerAndy Wingo <wingo@pobox.com>
Sat, 14 May 2005 15:54:49 +0000 (15:54 +0000)
Original commit message from CVS:
2005-05-14  Andy Wingo  <wingo@pobox.com>

* gst/gstbin.c (gst_bin_change_state): Fix state changes if a bin
has no sinks.

ChangeLog
docs/gst/tmpl/gstelement.sgml
gst/gstbin.c

index bd0ac3df8e026f6738950fb15e8e16591b00d1ac..f54a6fb2c27da7497212eceeb5937ca1da3a6f7f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-05-14  Andy Wingo  <wingo@pobox.com>
+
+       * gst/gstbin.c (gst_bin_change_state): Fix state changes if a bin
+       has no sinks.
+
 2005-05-13  Andy Wingo  <wingo@pobox.com>
 
        * gst/gstutils.c (gst_element_link_pads): Instead of calling
index 59986574a0201201097ee5606edf79584e444068..9f058d3b269309715c76f5dea0debfb36cc991ab 100644 (file)
@@ -229,6 +229,7 @@ This enum defines the standard flags that an element may have.
 @GST_ELEMENT_SCHEDULER_PRIVATE1: 
 @GST_ELEMENT_SCHEDULER_PRIVATE2: 
 @GST_ELEMENT_LOCKED_STATE: 
+@GST_ELEMENT_IS_SINK: 
 @GST_ELEMENT_FLAG_LAST: 
 
 <!-- ##### MACRO GST_ELEMENT_NAME ##### -->
index 090b994bef7a6bfe89cf8f39181dbc5a92c9f320..46d0a558213280a0b5e9e3fe0f9ce699e1761653 100644 (file)
@@ -899,6 +899,14 @@ restart:
   }
   GST_UNLOCK (bin);
 
+  /* can be the case for a bin like ( identity ) */
+  if (g_queue_is_empty (elem_queue) && !g_queue_is_empty (temp)) {
+    GQueue *q = elem_queue;
+
+    elem_queue = temp;
+    temp = q;
+  }
+
   /* second step, change state of elements in the queue */
   while (!g_queue_is_empty (elem_queue)) {
     GstElement *qelement;