gstrtpbin: Fix coverity issue 00/305600/4 accepted/tizen/unified/20240208.163950 accepted/tizen/unified/x/20240214.051941
authorJiyong <jiyong.min@samsung.com>
Mon, 5 Feb 2024 08:42:16 +0000 (17:42 +0900)
committerJiyong <jiyong.min@samsung.com>
Tue, 6 Feb 2024 03:48:21 +0000 (12:48 +0900)
 - MISSING_LOCK

[Version] 1.22.8-4
[Issue Type] Coverity

Change-Id: I6c10ce5e02f90f1c14f36f6297036d7116136941

packaging/gstreamer.spec
subprojects/gst-plugins-good/gst/rtpmanager/gstrtpbin.c

index 13d16ee..b2899b9 100644 (file)
@@ -62,7 +62,7 @@
 
 Name:           %{_name}
 Version:        1.22.8
-Release:        3
+Release:        4
 Summary:        Streaming-Media Framework Runtime
 License:        LGPL-2.0+
 Group:          Multimedia/Framework
index 21421b0..daa523c 100644 (file)
@@ -3802,15 +3802,19 @@ gst_rtp_bin_handle_message (GstBin * bin, GstMessage * message)
         gst_message_unref (message);
 
 #ifdef TIZEN_FEATURE_RTSP_MODIFICATION
-          if (rtpbin->use_rtsp_buffering &&
-              rtpbin->buffer_mode == RTP_JITTER_BUFFER_MODE_SLAVE) {
-          if (update_buffering_status == FALSE)
+        GST_RTP_BIN_LOCK (rtpbin);
+        if (rtpbin->use_rtsp_buffering &&
+            rtpbin->buffer_mode == RTP_JITTER_BUFFER_MODE_SLAVE) {
+          if (update_buffering_status == FALSE) {
+            GST_RTP_BIN_UNLOCK (rtpbin);
             break;
+          }
           if (buffering_flag) {
             min_percent = 100;
             GST_DEBUG_OBJECT (bin, "forcefully change min_percent to 100!!!");
           }
         }
+        GST_RTP_BIN_UNLOCK (rtpbin);
 #endif
         /* make a new buffering message with the min value */
         message =
@@ -3819,9 +3823,13 @@ gst_rtp_bin_handle_message (GstBin * bin, GstMessage * message)
             buffering_left);
 
 #ifdef TIZEN_FEATURE_RTSP_MODIFICATION
+        GST_RTP_BIN_LOCK (rtpbin);
         if (rtpbin->use_rtsp_buffering &&
-            rtpbin->buffer_mode == RTP_JITTER_BUFFER_MODE_SLAVE)
+            rtpbin->buffer_mode == RTP_JITTER_BUFFER_MODE_SLAVE) {
+          GST_RTP_BIN_UNLOCK (rtpbin);
           goto slave_buffering;
+        }
+        GST_RTP_BIN_UNLOCK (rtpbin);
 #endif
         if (G_UNLIKELY (change)) {
           GstClock *clock;