diff options
author | Wim Taymans <wim.taymans@gmail.com> | 2007-05-25 15:36:52 +0000 |
---|---|---|
committer | Wim Taymans <wim.taymans@gmail.com> | 2007-05-25 15:36:52 +0000 |
commit | 6892e94e1dc0e3d6e071389ae0ba08e1546156d4 (patch) | |
tree | c81df39cb95a0cd9ef13a41a886d8928587e27c5 /gst | |
parent | c0d4e1a104af561bdb6b69a7b1d67a43dcfb9ddb (diff) | |
download | gstreamer-6892e94e1dc0e3d6e071389ae0ba08e1546156d4.tar.gz |
gst/gstbin.c: Make sure that the child bin stops after completing the async state change so that the parent can conti...
Original commit message from CVS:
* gst/gstbin.c: (bin_handle_async_done):
Make sure that the child bin stops after completing the async state
change so that the parent can continue the state change to PLAYING.
Fixes #441159.
Diffstat (limited to 'gst')
-rw-r--r-- | gst/gstbin.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/gst/gstbin.c b/gst/gstbin.c index 24993931ec..4ffc742647 100644 --- a/gst/gstbin.c +++ b/gst/gstbin.c @@ -2481,6 +2481,7 @@ bin_handle_async_done (GstBin * bin, GstMessage ** message) GstStateChangeReturn old_ret; GstState old_state, old_next; GstState current, next; + gboolean cont; old_ret = GST_STATE_RETURN (bin); GST_STATE_RETURN (bin) = GST_STATE_CHANGE_SUCCESS; @@ -2496,8 +2497,14 @@ bin_handle_async_done (GstBin * bin, GstMessage ** message) /* update current state */ current = GST_STATE (bin) = old_next; - /* see if we reached the final state */ - if (pending == current) + /* see if we need to continue the state change on our own. This happens when + * we were asked to do so or when we are the toplevel bin. */ + cont = bin->priv->asynchandling || (GST_OBJECT_PARENT (bin) == NULL); + + /* see if we reached the final state. If we are not a toplevel bin we also + * must stop at this state change, the parent will set us to the required + * state eventually. */ + if (pending == current || !cont) goto complete; next = GST_STATE_GET_NEXT (current, pending); |