Didn't make tbm_bo when content didn't include album art 59/62659/1 accepted/tizen/common/20160317.161532 accepted/tizen/ivi/20160317.120517 accepted/tizen/mobile/20160317.120431 accepted/tizen/tv/20160317.120447 accepted/tizen/wearable/20160317.120503 submit/tizen/20160317.104713
authorGilbok Lee <gilbok.lee@samsung.com>
Thu, 17 Mar 2016 08:55:16 +0000 (17:55 +0900)
committerGilbok Lee <gilbok.lee@samsung.com>
Thu, 17 Mar 2016 08:55:16 +0000 (17:55 +0900)
Change-Id: I93883401e39d488fd1b252e317d9a09eb57ef698
Signed-off-by: Gilbok Lee <gilbok.lee@samsung.com>
muse/src/muse_player.c

index 1bf0fab..d91fa4e 100644 (file)
@@ -1374,7 +1374,7 @@ int player_disp_get_album_art(muse_module_h module)
        handle = muse_core_ipc_get_handle(module);
 
        ret = legacy_player_get_album_art((player_h)handle, &album_art, &size);
-       if (ret == PLAYER_ERROR_NONE) {
+       if (ret == PLAYER_ERROR_NONE && size > 0) {
                bo = tbm_bo_alloc(bufmgr, size+1, TBM_BO_DEFAULT);
                if (!bo) {
                        LOGE("TBM get error : tbm_bo_alloc return NULL");
@@ -1411,6 +1411,9 @@ int player_disp_get_album_art(muse_module_h module)
                        tbm_bo_unmap(bo);
                }
                tbm_bo_unref(bo);
+       } else if (ret == PLAYER_ERROR_NONE) {
+               LOGD("album art size is zero, didn't make tbm_bo");
+               player_msg_return2(api, ret, module, INT, size, INT, 0);
        }
        else
                player_msg_return(api, ret, module);