mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 07:16:55 +00:00
bin: Do not deactivate pad in NULL_TO_READY
Since b76d336549
pads are deactivated when going to READY but in `uridecodebin(3)`, the
sources source pads are activated while in NULL state (when PULL mode is
supported), meaning that we are ending up deactivating those pads in
NULL_TO_READY, breaking the pipeline.
The intent of the commit mentioned above is to ensure that the pads are
deactivated either in PAUSED_TO_READY or READY_TO_READY, so it should
be safe to avoid deactivating in NULL_TO_READY.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3849>
This commit is contained in:
parent
c3e52d5c4f
commit
1bab0ef2aa
1 changed files with 7 additions and 4 deletions
|
@ -2876,10 +2876,13 @@ 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);
|
||||
/* 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;
|
||||
/* Pads can be activated in PULL mode before in NULL state */
|
||||
if (current != GST_STATE_NULL) {
|
||||
/* 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:
|
||||
/* Clear message list on next NULL */
|
||||
|
|
Loading…
Reference in a new issue