LOGI("[%s] Start", __FUNCTION__);
PLAYER_INSTANCE_CHECK(player);
player_s *handle = (player_s *)player;
- if (handle->state == PLAYER_STATE_PLAYING || handle->state == PLAYER_STATE_PAUSED) {
- int ret = mm_player_stop(handle->mm_handle);
+ int ret = MM_ERROR_NONE;
- if (handle->display_type == PLAYER_DISPLAY_TYPE_OVERLAY)
+ if (handle->state == PLAYER_STATE_PLAYING || handle->state == PLAYER_STATE_PAUSED) {
+ if (handle->display_type == PLAYER_DISPLAY_TYPE_OVERLAY) {
ret = mm_player_set_attribute(handle->mm_handle, NULL, "display_visible", 0, (char *)NULL);
+ if (ret != MM_ERROR_NONE) {
+ LOGW("[%s] Failed to set display_visible '0' (0x%x)", __FUNCTION__, ret);
+ }
+ }
+ ret = mm_player_stop(handle->mm_handle);
if (ret != MM_ERROR_NONE) {
return __player_convert_error_code(ret, (char *)__FUNCTION__);
} else {