[0.3.48] fix svace issue 48/115148/1
authorEunhae Choi <eunhae1.choi@samsung.com>
Thu, 16 Feb 2017 10:50:20 +0000 (19:50 +0900)
committerEunhae Choi <eunhae1.choi@samsung.com>
Thu, 16 Feb 2017 11:51:51 +0000 (20:51 +0900)
Change-Id: If9d294024f3417488fa886d0f651738284b54911

packaging/capi-media-player.spec
src/player.c
test/player_test.c

index ffac7e8..261f0f8 100644 (file)
@@ -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
index 5be820e..671b904 100755 (executable)
@@ -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)
index 1836d70..d53b185 100644 (file)
@@ -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)