[v0.2.34] not to post error msg twice 47/96247/1
authorEunhae Choi <eunhae1.choi@samsung.com>
Tue, 8 Nov 2016 08:35:47 +0000 (17:35 +0900)
committerEunhae Choi <eunhae1.choi@samsung.com>
Tue, 8 Nov 2016 08:37:10 +0000 (17:37 +0900)
Change-Id: I630f03c0483d293792a6fc9df93a3a09381b3dc6

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

index 8371eee3054933f0c741b57595670662b6ca83d3..bf8b3e1e5c45d5aed62034e57731cd0e1677149b 100644 (file)
@@ -1205,12 +1205,13 @@ static void *__prepare_async_thread_func(void *data)
        ret = mm_player_pause(handle->mm_handle);
        if (ret != MM_ERROR_NONE) {
                LOGE("[%s] Failed to pause - core fw error(0x%x)", __FUNCTION__, ret);
-               /*MM_MESSAGE_ERROR will not be posted as legacy_player_prepare(sync API) works with return value
-                  of mm_player_pause So in case of async API we post the error message to application from here */
-               MMMessageParamType msg_param;
-               msg_param.code = ret;
-               __msg_callback(MM_MESSAGE_ERROR, (void *)&msg_param, (void *)handle);
-
+               if (handle->error_code == PLAYER_ERROR_NONE) {
+                       /*MM_MESSAGE_ERROR will not be posted as legacy_player_prepare(sync API) works with return value
+                          of mm_player_pause So in case of async API we post the error message to application from here */
+                       MMMessageParamType msg_param;
+                       msg_param.code = ret;
+                       __msg_callback(MM_MESSAGE_ERROR, (void *)&msg_param, (void *)handle);
+               }
                ret = mm_player_unrealize(handle->mm_handle);
                if (ret != MM_ERROR_NONE)
                        LOGE("[%s] Failed to unrealize - 0x%x", __FUNCTION__, ret);
index 83af0e2165fa65daea008452b0f5e217a1ed678d..66822ad8e399b18eecf5b18d80e664700db32961 100644 (file)
@@ -1,6 +1,6 @@
 Name:       mmsvc-player
 Summary:    A Media Player module for muse server
-Version:    0.2.33
+Version:    0.2.34
 Release:    0
 Group:      Multimedia/Libraries
 License:    Apache-2.0