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);