Skip to content

inputselector: Avoid deadlock when requesting pads

Edward Hervey requested to merge bilboed/gstreamer:selectorlock into master

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.

Merge request reports