webrtcdatachannel: Lock before accessing parent.ready_state 43/305243/2
authorSangchul Lee <sc11.lee@samsung.com>
Tue, 30 Jan 2024 08:32:22 +0000 (17:32 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Thu, 1 Feb 2024 01:56:49 +0000 (10:56 +0900)
[Version] 1.22.8-2
[Issue Type] Coverity defect

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

index abffcf7b9005a5a1d6fc5c074d1729a037c38cff..325cb81dc0914232d1f7314f098c5eb1e87d6420 100644 (file)
@@ -62,7 +62,7 @@
 
 Name:           %{_name}
 Version:        1.22.8
-Release:        1
+Release:        2
 Summary:        Streaming-Media Framework Runtime
 License:        LGPL-2.0+
 Group:          Multimedia/Framework
index e4691f07b605c1a93268adbc03aed0c3bcfd6a8a..c473857e1ba2a9819e4796228f15ea235c0f8a62 100644 (file)
@@ -1065,13 +1065,22 @@ on_appsrc_data (GstPad * pad, GstPadProbeInfo * info, gpointer user_data)
   } else if (GST_PAD_PROBE_INFO_TYPE (info) &
       GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM) {
     GstEvent *event = GST_PAD_PROBE_INFO_EVENT (info);
+#ifdef TIZEN_FEATURE_WEBRTC_MODIFICATION
+    GST_WEBRTC_DATA_CHANNEL_LOCK (channel);
+#endif
     if (GST_EVENT_TYPE (event) == GST_EVENT_EOS
         && channel->parent.ready_state ==
         GST_WEBRTC_DATA_CHANNEL_STATE_CLOSING) {
       _channel_enqueue_task (channel, (ChannelTask) _close_sctp_stream, NULL,
           NULL);
+#ifdef TIZEN_FEATURE_WEBRTC_MODIFICATION
+      GST_WEBRTC_DATA_CHANNEL_UNLOCK (channel);
+#endif
       return GST_PAD_PROBE_DROP;
     }
+#ifdef TIZEN_FEATURE_WEBRTC_MODIFICATION
+    GST_WEBRTC_DATA_CHANNEL_UNLOCK (channel);
+#endif
   }
 
   if (size > 0) {