From 30d028317bc8a1ad45b4e7b48737d3006c5ef98f Mon Sep 17 00:00:00 2001 From: Mathieu Duponchelle Date: Wed, 16 Mar 2022 00:05:19 +0100 Subject: [PATCH] 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: --- subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c b/subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c index a28d852844..22f770455c 100644 --- a/subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c +++ b/subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c @@ -4463,7 +4463,7 @@ _build_fec_encoder (GstWebRTCBin * webrtc, WebRTCTransceiver * trans) sinkpad = gst_element_get_static_pad (trans->ulpfecenc, "sink"); g_object_bind_property (rtp_trans, "fec-percentage", trans->ulpfecenc, - "percentage", G_BINDING_BIDIRECTIONAL); + "percentage", G_BINDING_DEFAULT); trans->redenc = gst_element_factory_make ("rtpredenc", NULL); gst_object_ref_sink (trans->redenc);