[0.2.50] add state checking 97/127397/1
authorEunhae Choi <eunhae1.choi@samsung.com>
Thu, 27 Apr 2017 06:47:09 +0000 (15:47 +0900)
committerEunhae Choi <eunhae1.choi@samsung.com>
Thu, 27 Apr 2017 06:47:09 +0000 (15:47 +0900)
Change-Id: I3a6da42632ca44451536ce007be7013bbbf55914

legacy/src/legacy_player.c
packaging/mmsvc-player.spec

index f493180..fbd5f0e 100644 (file)
@@ -2166,7 +2166,12 @@ int legacy_player_audio_effect_equalizer_is_available(player_h player, bool *ava
 {
        PLAYER_INSTANCE_CHECK(player);
        PLAYER_NULL_ARG_CHECK(available);
+
        player_s *handle = (player_s *)player;
+       if (!__player_state_validate(handle, PLAYER_STATE_IDLE)) {
+               LOGE("[%s] PLAYER_ERROR_INVALID_STATE(0x%08x) : current state - %d", __FUNCTION__, PLAYER_ERROR_INVALID_STATE, handle->state);
+               return PLAYER_ERROR_INVALID_STATE;
+       }
 
        int ret = mm_player_is_supported_custom_effect_type(handle->mm_handle, MM_AUDIO_EFFECT_CUSTOM_EQ);
        if (ret != MM_ERROR_NONE)
index bd40630..fd0c556 100644 (file)
@@ -1,6 +1,6 @@
 Name:       mmsvc-player
 Summary:    A Media Player module for muse server
-Version:    0.2.49
+Version:    0.2.50
 Release:    0
 Group:      Multimedia/Libraries
 License:    Apache-2.0