summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@collabora.co.uk>2012-06-12 17:11:51 +0200
committerThiago Santos <thiago.sousa.santos@collabora.com>2012-06-25 12:20:54 -0300
commit36c61df29724eb2b2732eb0efb49ba897d0bb64a (patch)
tree995a69a289e4afa7d086b32e906c13b593e950cf
parenta396ba2bde151760b6c5a0ec84266674f501bf74 (diff)
downloadgstreamer-36c61df29724eb2b2732eb0efb49ba897d0bb64a.tar.gz
bin: always recurse into bins when doing state changes
Never skip the state change of a bin because it needs to update the base time of its children when needed.
-rw-r--r--gst/gstbin.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gst/gstbin.c b/gst/gstbin.c
index a09024cedf..4756569a56 100644
--- a/gst/gstbin.c
+++ b/gst/gstbin.c
@@ -2165,6 +2165,10 @@ gst_bin_element_set_state (GstBin * bin, GstElement * element,
gst_element_state_get_name (child_pending),
gst_element_state_get_name (next));
+ /* always recurse into bins so that we can set the base time */
+ if (GST_IS_BIN (element))
+ goto do_state;
+
/* Try not to change the state of elements that are already in the state we're
* going to */
if (child_current == next && child_pending == GST_STATE_VOID_PENDING) {
@@ -2228,6 +2232,7 @@ gst_bin_element_set_state (GstBin * bin, GstElement * element,
}
}
+do_state:
GST_OBJECT_LOCK (bin);
/* the element was busy with an upwards async state change, we must wait for
* an ASYNC_DONE message before we attemp to change the state. */