webrtcbin: Lock data channel before accessing parent.prev_ready_state 72/305372/1
authorSangchul Lee <sc11.lee@samsung.com>
Thu, 1 Feb 2024 03:08:44 +0000 (12:08 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Thu, 1 Feb 2024 03:09:53 +0000 (12:09 +0900)
[Version] 1.22.8-3
[Issue Type] Coverity defect

Change-Id: I0f153febf36fd83112a33963719b59130a384a1c
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
packaging/gstreamer.spec
subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c

index 325cb81..13d16ee 100644 (file)
@@ -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
index 55a7d71..d50d997 100644 (file)
@@ -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);