Commit f2478618 authored by Edward Hervey's avatar Edward Hervey 🤘 Committed by GStreamer Merge Bot

inputselector: Avoid deadlock when requesting pads

The deadlock was the following:
* One thread requests a new pad, the internal lock is kept while adding the pad
* Another thread (or the same one) requests the internal links of a pad (could
be that pad)... which also requires that lock.

That internal lock is not required when adding the pad to the element (which is
the last action when requesting a new pad). The fact it will be actually used
will be *after* the request pad function is released.

Part-of: <!512>
parent cc873571
Pipeline #156654 waiting for manual action with stages
in 32 seconds
......@@ -1813,8 +1813,8 @@ gst_input_selector_request_new_pad (GstElement * element,
gst_pad_set_active (sinkpad, TRUE);
gst_element_add_pad (GST_ELEMENT (sel), sinkpad);
gst_element_add_pad (GST_ELEMENT (sel), sinkpad);
return sinkpad;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment