[0.6.274] Fix coverity issue (MISSING_LOCK) 01/304701/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 08:24:54 +0000 (17:24 +0900)
Change-Id: Ibec8c461cb58ceedfff50a184ed108bb8b484568

src/mm_player_gst.c
src/mm_player_priv.c

index 5ec69e8d6ccfab0b4875d51f2acb3d40d7c8b4eb..e99c314a78b1e0ace2dc4ce5aeeda261f88e3eb3 100644 (file)
@@ -912,10 +912,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 bcf15b5d0f3df9f705f47344850a5e8cfbfcc3ce..d2950bc977f638698840b832bd4fa3e081fbc0ae 100644 (file)
@@ -1023,10 +1023,12 @@ __mmplayer_gst_selector_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: