[0.6.291] Fix coverity issue (MISSING_LOCK) 46/304646/1
authorGilbok Lee <gilbok.lee@samsung.com>
Tue, 23 Jan 2024 00:36:44 +0000 (09:36 +0900)
committerGilbok Lee <gilbok.lee@samsung.com>
Tue, 23 Jan 2024 00:36:56 +0000 (09:36 +0900)
Change-Id: Ibec8c461cb58ceedfff50a184ed108bb8b484568

src/mm_player_gst.c
src/mm_player_priv.c

index 78c58d7275b973adb1ef245efc1c250554d2cab6..6d9b970409e4022f86f76f4ff7d58c708fb1eb4b 100644 (file)
@@ -916,10 +916,12 @@ __mmplayer_gst_check_useful_message(mmplayer_t *player, GstMessage *message)
        case GST_MESSAGE_ASYNC_DONE:
        case GST_MESSAGE_STATE_CHANGED:
                /* we only handle messages from pipeline */
+               MMPLAYER_RECONFIGURE_LOCK(player);
                if ((message->src == (GstObject *)player->pipeline->mainbin[MMPLAYER_M_PIPE].gst) && (!player->gapless.reconfigure))
                        retval = TRUE;
                else
                        retval = FALSE;
+               MMPLAYER_RECONFIGURE_UNLOCK(player);
                break;
        case GST_MESSAGE_BUFFERING:
        {
index d8d1141fc05889b37b4b4064fea5f8a88de662df..855943ec3849c15a3c5fdf5084b54f12633abfdb 100644 (file)
@@ -1040,10 +1040,12 @@ __mmplayer_gst_combiner_event_probe(GstPad *pad, GstPadProbeInfo *info, gpointer
        case GST_EVENT_EOS:
                {
                        /* in case of gapless, drop eos event not to send it to sink */
+                       MMPLAYER_RECONFIGURE_LOCK(player);
                        if (player->gapless.reconfigure && !player->msg_posted) {
                                LOGD("[%d] %s:%s EOS received but will be drop", stream_type, GST_DEBUG_PAD_NAME(pad));
                                ret = GST_PAD_PROBE_DROP;
                        }
+                       MMPLAYER_RECONFIGURE_UNLOCK(player);
                        break;
                }
        case GST_EVENT_STREAM_START: