uridecodebin3: Don't hold play items lock while releasing pads
Releasing the pad can cause messages that call back into the message handler of uridecodebin3 and take exactly the same lock again. Fix #4443 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9032>
This commit is contained in:
parent
7ffbb1ce34
commit
8f627b1f9c
@ -1128,8 +1128,12 @@ switch_and_activate_input_locked (GstURIDecodeBin3 * uridecodebin,
|
|||||||
GstSourcePad *old_spad = iterold->data;
|
GstSourcePad *old_spad = iterold->data;
|
||||||
if (old_spad->db3_sink_pad) {
|
if (old_spad->db3_sink_pad) {
|
||||||
GST_DEBUG_OBJECT (uridecodebin, "Releasing no longer used db3 pad");
|
GST_DEBUG_OBJECT (uridecodebin, "Releasing no longer used db3 pad");
|
||||||
|
/* Temporarily release play items lock to avoid deadlock if releasing the
|
||||||
|
* pad causes a message that calls back into our message handler. */
|
||||||
|
PLAY_ITEMS_UNLOCK (uridecodebin);
|
||||||
gst_element_release_request_pad (uridecodebin->decodebin,
|
gst_element_release_request_pad (uridecodebin->decodebin,
|
||||||
old_spad->db3_sink_pad);
|
old_spad->db3_sink_pad);
|
||||||
|
PLAY_ITEMS_LOCK (uridecodebin);
|
||||||
old_spad->db3_sink_pad = NULL;
|
old_spad->db3_sink_pad = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user