mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-07 07:58:51 +00:00
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.
This commit is contained in:
parent
c0d4e1a104
commit
6892e94e1d
2 changed files with 16 additions and 2 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2007-05-25 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
|
* 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.
|
||||||
|
|
||||||
2007-05-25 Wim Taymans <wim@fluendo.com>
|
2007-05-25 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
* libs/gst/base/gstcollectpads.c: (gst_collect_pads_finalize),
|
* libs/gst/base/gstcollectpads.c: (gst_collect_pads_finalize),
|
||||||
|
|
11
gst/gstbin.c
11
gst/gstbin.c
|
@ -2481,6 +2481,7 @@ bin_handle_async_done (GstBin * bin, GstMessage ** message)
|
||||||
GstStateChangeReturn old_ret;
|
GstStateChangeReturn old_ret;
|
||||||
GstState old_state, old_next;
|
GstState old_state, old_next;
|
||||||
GstState current, next;
|
GstState current, next;
|
||||||
|
gboolean cont;
|
||||||
|
|
||||||
old_ret = GST_STATE_RETURN (bin);
|
old_ret = GST_STATE_RETURN (bin);
|
||||||
GST_STATE_RETURN (bin) = GST_STATE_CHANGE_SUCCESS;
|
GST_STATE_RETURN (bin) = GST_STATE_CHANGE_SUCCESS;
|
||||||
|
@ -2496,8 +2497,14 @@ bin_handle_async_done (GstBin * bin, GstMessage ** message)
|
||||||
/* update current state */
|
/* update current state */
|
||||||
current = GST_STATE (bin) = old_next;
|
current = GST_STATE (bin) = old_next;
|
||||||
|
|
||||||
/* see if we reached the final state */
|
/* see if we need to continue the state change on our own. This happens when
|
||||||
if (pending == current)
|
* 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;
|
goto complete;
|
||||||
|
|
||||||
next = GST_STATE_GET_NEXT (current, pending);
|
next = GST_STATE_GET_NEXT (current, pending);
|
||||||
|
|
Loading…
Reference in a new issue