webrtcbin: fix deadlock when setting up FEC encoder
authorMathieu Duponchelle <mathieu@centricular.com>
Tue, 15 Mar 2022 23:05:19 +0000 (00:05 +0100)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Wed, 16 Mar 2022 06:06:39 +0000 (06:06 +0000)
commit30d028317bc8a1ad45b4e7b48737d3006c5ef98f
tree4bd367a70994012c5bfccfd0e7d9b593d3cd0203
parent5c54cad469aafa4009481b9d925079267f8a4679
webrtcbin: fix deadlock when setting up FEC encoder

We bind transceivers' fec_percentage property to the FEC encoder
percentage property, and with the binding bidirectional a deadlock
was introduced by the latest changes from !1762:

We take hold of the transceiver's object lock, then add the binding
and set the property to its initial value on the encoder, which causes
set_property to deadlock in the transceiver when the binding kicks in.

Changing the binding type to DEFAULT (source to target) is enough
to address the deadlock and still serves the original intent.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1967>
subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c