rtpssrcdemux: Avoid taking streamlock out-of-band
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Tue, 21 May 2019 19:25:03 +0000 (15:25 -0400)
committerTim-Philipp Müller <tim@centricular.com>
Thu, 8 Aug 2019 08:50:53 +0000 (09:50 +0100)
commitf97aed4af53bccf44cd44ea6576e821b56a7756d
tree87081ffef728c758fad41053cf68e81d5a8f5ce3
parent608a9dc177512300ba95ac0ec5c44dac03418894
rtpssrcdemux: Avoid taking streamlock out-of-band

In this change we now protect the internal srcpads list using the
stream lock and limit usage of the internal stream lock to
preventing data flowing on the other src pad type while creating
and signalling the new pad.

This fixes a deadlock with RTPBin shutdown lock. These two locks would
end up being taken in two different order, which caused a deadlock. More
generally, we should not rely on a streamlock when handling out-of-band
data, so as a side effect, we should not take a stream lock when
iterating internal links.
gst/rtpmanager/gstrtpssrcdemux.c
tests/check/elements/rtpssrcdemux.c