mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 07:16:55 +00:00
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:
parent
ce8752c5ce
commit
b76d336549
1 changed files with 4 additions and 3 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue