bin: When going to READY make sure to always deactivate pads

We might not have reached PAUSED yet because of an async error,
but nonetheless we want to make sure that the pads are always
deactivated in READY state.
This commit is contained in:
Sebastian Dröge 2014-04-25 15:38:39 +02:00
parent ce8752c5ce
commit b76d336549

View file

@ -2579,9 +2579,10 @@ gst_bin_change_state_func (GstElement * element, GstStateChange transition)
GST_DEBUG_OBJECT (element, "clearing all cached messages");
bin_remove_messages (bin, NULL, GST_MESSAGE_ANY);
GST_OBJECT_UNLOCK (bin);
if (current == GST_STATE_PAUSED)
if (!(gst_bin_src_pads_activate (bin, FALSE)))
goto activate_failure;
/* We might not have reached PAUSED yet due to async errors,
* make sure to always deactivate the pads nonetheless */
if (!(gst_bin_src_pads_activate (bin, FALSE)))
goto activate_failure;
break;
case GST_STATE_NULL:
if (current == GST_STATE_READY) {