From 8190988fd8c31d26941ba00979bbebe42646e980 Mon Sep 17 00:00:00 2001 From: Jiyong Date: Mon, 5 Feb 2024 17:42:16 +0900 Subject: [PATCH] gstrtpbin: Fix coverity issue - MISSING_LOCK [Version] 1.22.8-4 [Issue Type] Coverity Change-Id: I6c10ce5e02f90f1c14f36f6297036d7116136941 --- packaging/gstreamer.spec | 2 +- subprojects/gst-plugins-good/gst/rtpmanager/gstrtpbin.c | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/packaging/gstreamer.spec b/packaging/gstreamer.spec index 13d16ee..b2899b9 100644 --- a/packaging/gstreamer.spec +++ b/packaging/gstreamer.spec @@ -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 diff --git a/subprojects/gst-plugins-good/gst/rtpmanager/gstrtpbin.c b/subprojects/gst-plugins-good/gst/rtpmanager/gstrtpbin.c index 21421b0..daa523c 100644 --- a/subprojects/gst-plugins-good/gst/rtpmanager/gstrtpbin.c +++ b/subprojects/gst-plugins-good/gst/rtpmanager/gstrtpbin.c @@ -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; -- 2.7.4