composition: Set the state of the internal bin before removing its children

Otherwize when we set the composition state to READY or NULL we can end
up with children in PAUSED state outside of everything

Co-Authored by: Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
This commit is contained in:
Thibault Saunier 2014-07-03 14:48:25 +02:00
parent d73cab7186
commit 3f76ea7c2f

View file

@ -2193,8 +2193,11 @@ gnl_composition_change_state (GstElement * element, GstStateChange transition)
_add_initialize_stack_gsource (comp);
break;
case GST_STATE_CHANGE_PAUSED_TO_READY:
/* Fallthrough */
gst_element_set_state (comp->priv->current_bin, GST_STATE_READY);
gnl_composition_reset (comp);
break;
case GST_STATE_CHANGE_READY_TO_NULL:
gst_element_set_state (comp->priv->current_bin, GST_STATE_NULL);
gnl_composition_reset (comp);
break;
default: