From 2ebde16164f43b8e8c2ee12d9f8721b38776652e Mon Sep 17 00:00:00 2001 From: Eunhae Choi Date: Thu, 16 Feb 2017 19:50:20 +0900 Subject: [PATCH] [0.3.48] fix svace issue Change-Id: If9d294024f3417488fa886d0f651738284b54911 --- packaging/capi-media-player.spec | 2 +- src/player.c | 8 ++++---- test/player_test.c | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packaging/capi-media-player.spec b/packaging/capi-media-player.spec index ffac7e8..261f0f8 100644 --- a/packaging/capi-media-player.spec +++ b/packaging/capi-media-player.spec @@ -1,6 +1,6 @@ Name: capi-media-player Summary: A Media Player API -Version: 0.3.47 +Version: 0.3.48 Release: 0 Group: Multimedia/API License: Apache-2.0 diff --git a/src/player.c b/src/player.c index 5be820e..671b904 100755 --- a/src/player.c +++ b/src/player.c @@ -740,7 +740,7 @@ static void __player_remove_tsurf_list(player_cli_s * pc) return; } -static player_tsurf_info_t* __player_get_tsurf_from_list(callback_cb_info_s * cb_info, int *key, tbm_surface_info_s sinfo) +static player_tsurf_info_t* __player_get_tsurf_from_list(callback_cb_info_s * cb_info, int *key, int height, int width) { GList *l = NULL; @@ -751,8 +751,8 @@ static player_tsurf_info_t* __player_get_tsurf_from_list(callback_cb_info_s * cb LOGD("found tsurf_data of tbm_key %d", key[0]); /* need to check tsuf info to support DRC */ - if ((tbm_surface_get_height(tmp->tsurf) != sinfo.height) || - (tbm_surface_get_width(tmp->tsurf) != sinfo.width)) { + if ((tbm_surface_get_height(tmp->tsurf) != height) || + (tbm_surface_get_width(tmp->tsurf) != width)) { cb_info->tsurf_list = g_list_remove(cb_info->tsurf_list, tmp); LOGW("tsurf info is changed. need to create new tsurf."); @@ -829,7 +829,7 @@ static void __media_packet_video_frame_cb_handler(callback_cb_info_s * cb_info, goto ERROR; } - tsurf_data = __player_get_tsurf_from_list(cb_info, key, sinfo); + tsurf_data = __player_get_tsurf_from_list(cb_info, key, (int)sinfo.height, (int)sinfo.width); if (!tsurf_data) { for (i = 0; i < MUSE_NUM_FD; i++) { if (recv_data->tfd[i] <= INVALID_DEFAULT_VALUE) diff --git a/test/player_test.c b/test/player_test.c index 1836d70..d53b185 100644 --- a/test/player_test.c +++ b/test/player_test.c @@ -1211,8 +1211,8 @@ static void _player_set_progressive_download() static void _player_get_progressive_download_status() { - int bRet; - unsigned long curr, total; + int bRet = 0; + unsigned long curr = 0, total = 0; bRet = player_get_progressive_download_status(g_player[0], &curr, &total); g_print("player_get_progressive_download_status return[%d] ==> [Player_Test] progressive download status : %lu/%lu\n", bRet, curr, total); } @@ -1327,7 +1327,7 @@ static void set_sound_stream_info(int type) if ((ret = sound_manager_get_device_list(SOUND_DEVICE_ALL_MASK, &device_list))) { g_print("failed to sound_manager_get_device_list(), ret(0x%x)\n", ret); - return; + goto END; } while (!(ret = sound_manager_get_next_device(device_list, &device))) { if ((ret = sound_manager_get_device_type(device, &device_type))) { @@ -1737,7 +1737,7 @@ static void decoding_audio() static void set_audio_eq(int value) { bool available = FALSE; - int index, min, max; + int index, min = 0, max = 0; if (value) { if (player_audio_effect_equalizer_is_available(g_player[0], &available) != PLAYER_ERROR_NONE) -- 2.7.4