mm_sound_server: fix not to nofity complete callback in case of stopping wav playback
[platform/core/multimedia/libmm-sound.git] / server / mm_sound_mgr_codec.c
index df5e057..1bb36f1 100644 (file)
@@ -443,11 +443,11 @@ static int _MMSoundMgrCodecStopCallback(int param)
 
        debug_enter("(Slot : %d) stop-by-user : %d", param, g_slots[param].stop_by_user);
 
-       if (g_slots[param].stop_by_user == false)
+       if (!g_slots[param].stop_by_user) {
                SLOT_LOCK();
-
-       __mm_sound_mgr_ipc_notify_play_file_end(param);
-       debug_msg("Client callback msg_type (instance) : [%d]", (int)g_slots[param].param);
+               __mm_sound_mgr_ipc_notify_play_file_end(param);
+               debug_msg("Client callback msg_type (instance) : [%d]", (int)g_slots[param].param);
+       }
 
        debug_msg("Handle allocated handle : [%p]", g_slots[param].plughandle);
        err = g_plugins[g_slots[param].pluginid].Destroy(g_slots[param].plughandle);
@@ -458,7 +458,7 @@ static int _MMSoundMgrCodecStopCallback(int param)
        if (_mm_sound_mgr_codec_slot_is_empty())
                _mm_sound_mgr_codec_shutdown_timer_start();
 
-       if (g_slots[param].stop_by_user == false)
+       if (!g_slots[param].stop_by_user)
                SLOT_UNLOCK();
 
        debug_fleave();