mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 11:41:09 +00:00
urisourcebin: Don't acquire STATE_LOCK if shutting down
If we are shutting down (PAUSED->READY) we shouldn't take the STATE LOCK since this function is being called from a streaming thread (which is trying to be deactivated while the STATE LOCK is held) Fixes #3292 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6121>
This commit is contained in:
parent
d86a6715e1
commit
d62c6e1084
1 changed files with 8 additions and 3 deletions
|
@ -1943,8 +1943,13 @@ setup_parsebin_for_slot (ChildSrcPadInfo * info, GstPad * originating_pad)
|
|||
GST_DEBUG_OBJECT (urisrc, "Setting up parsebin for %" GST_PTR_FORMAT,
|
||||
originating_pad);
|
||||
|
||||
GST_STATE_LOCK (urisrc);
|
||||
GST_URI_SOURCE_BIN_LOCK (urisrc);
|
||||
if (urisrc->flushing) {
|
||||
GST_DEBUG_OBJECT (urisrc, "Shutting down, returning early");
|
||||
GST_URI_SOURCE_BIN_UNLOCK (urisrc);
|
||||
return FALSE;
|
||||
}
|
||||
GST_STATE_LOCK (urisrc);
|
||||
|
||||
/* Set up optional pre-parsebin download/ringbuffer elements */
|
||||
if (info->use_downloadbuffer || urisrc->ring_buffer_max_size) {
|
||||
|
@ -2014,8 +2019,8 @@ setup_parsebin_for_slot (ChildSrcPadInfo * info, GstPad * originating_pad)
|
|||
}
|
||||
gst_element_set_locked_state (info->demuxer, FALSE);
|
||||
gst_element_sync_state_with_parent (info->demuxer);
|
||||
GST_URI_SOURCE_BIN_UNLOCK (urisrc);
|
||||
GST_STATE_UNLOCK (urisrc);
|
||||
GST_URI_SOURCE_BIN_UNLOCK (urisrc);
|
||||
return TRUE;
|
||||
|
||||
could_not_link:
|
||||
|
@ -2024,8 +2029,8 @@ could_not_link:
|
|||
gst_element_set_locked_state (info->pre_parse_queue, FALSE);
|
||||
if (info->demuxer)
|
||||
gst_element_set_locked_state (info->demuxer, FALSE);
|
||||
GST_URI_SOURCE_BIN_UNLOCK (urisrc);
|
||||
GST_STATE_UNLOCK (urisrc);
|
||||
GST_URI_SOURCE_BIN_UNLOCK (urisrc);
|
||||
GST_ELEMENT_ERROR (urisrc, CORE, NEGOTIATION,
|
||||
(NULL), ("Can't link to (pre-)parsebin element"));
|
||||
return FALSE;
|
||||
|
|
Loading…
Reference in a new issue