summaryrefslogtreecommitdiff
path: root/gst-libs/gst/webrtc/rtpreceiver.c
diff options
context:
space:
mode:
Diffstat (limited to 'gst-libs/gst/webrtc/rtpreceiver.c')
-rw-r--r--gst-libs/gst/webrtc/rtpreceiver.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gst-libs/gst/webrtc/rtpreceiver.c b/gst-libs/gst/webrtc/rtpreceiver.c
index edf6e201b..f21d77ef1 100644
--- a/gst-libs/gst/webrtc/rtpreceiver.c
+++ b/gst-libs/gst/webrtc/rtpreceiver.c
@@ -60,8 +60,10 @@ gst_webrtc_rtp_receiver_set_transport (GstWebRTCRTPReceiver * receiver,
g_return_if_fail (GST_IS_WEBRTC_RTP_RECEIVER (receiver));
g_return_if_fail (GST_IS_WEBRTC_DTLS_TRANSPORT (transport));
+ GST_OBJECT_LOCK (receiver);
gst_object_replace ((GstObject **) & receiver->transport,
GST_OBJECT (transport));
+ GST_OBJECT_UNLOCK (receiver);
}
void
@@ -71,8 +73,10 @@ gst_webrtc_rtp_receiver_set_rtcp_transport (GstWebRTCRTPReceiver * receiver,
g_return_if_fail (GST_IS_WEBRTC_RTP_RECEIVER (receiver));
g_return_if_fail (GST_IS_WEBRTC_DTLS_TRANSPORT (transport));
+ GST_OBJECT_LOCK (receiver);
gst_object_replace ((GstObject **) & receiver->rtcp_transport,
GST_OBJECT (transport));
+ GST_OBJECT_UNLOCK (receiver);
}
static void