From a3be6497509d0811394e87bfaadbf4c0569dc15a Mon Sep 17 00:00:00 2001 From: Sangchul Lee Date: Thu, 1 Feb 2024 12:08:44 +0900 Subject: [PATCH] webrtcbin: Lock data channel before accessing parent.prev_ready_state [Version] 1.22.8-3 [Issue Type] Coverity defect Change-Id: I0f153febf36fd83112a33963719b59130a384a1c Signed-off-by: Sangchul Lee --- packaging/gstreamer.spec | 2 +- subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packaging/gstreamer.spec b/packaging/gstreamer.spec index 325cb81..13d16ee 100644 --- a/packaging/gstreamer.spec +++ b/packaging/gstreamer.spec @@ -62,7 +62,7 @@ Name: %{_name} Version: 1.22.8 -Release: 2 +Release: 3 Summary: Streaming-Media Framework Runtime License: LGPL-2.0+ Group: Multimedia/Framework diff --git a/subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c b/subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c index 55a7d71..d50d997 100644 --- a/subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c +++ b/subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c @@ -2581,10 +2581,11 @@ _on_data_channel_ready_state (WebRTCDataChannel * channel, DC_LOCK (webrtc); #ifdef TIZEN_FEATURE_WEBRTC_MODIFICATION + GST_WEBRTC_DATA_CHANNEL_LOCK (channel); if (channel->parent.prev_ready_state == GST_WEBRTC_DATA_CHANNEL_STATE_OPEN || channel->parent.prev_ready_state == GST_WEBRTC_DATA_CHANNEL_STATE_CLOSING) webrtc->priv->data_channels_closed++; - + GST_WEBRTC_DATA_CHANNEL_UNLOCK (channel); #endif found = g_ptr_array_remove (webrtc->priv->pending_data_channels, channel) || g_ptr_array_remove (webrtc->priv->data_channels, channel); -- 2.7.4