fix coverity bug 47/157747/2
authorHyunil <hyunil46.park@samsung.com>
Thu, 26 Oct 2017 05:42:16 +0000 (14:42 +0900)
committerHyunil <hyunil46.park@samsung.com>
Thu, 26 Oct 2017 05:47:56 +0000 (14:47 +0900)
Change-Id: I7391c80968af81112caf61d2012c40560f5a8b9d
Signed-off-by: Hyunil <hyunil46.park@samsung.com>
src/player.c

index 2a847fe..01e4252 100644 (file)
@@ -560,7 +560,7 @@ static void __seek_cb_handler(callback_cb_info_s * cb_info, _player_recv_data *r
 {
        muse_player_event_e ev = MUSE_PLAYER_EVENT_TYPE_SEEK;
 #ifdef TIZEN_FEATURE_EVAS_RENDERER
-       void *dl_handle;
+       void *dl_handle = NULL;
        int (*p_disp_set_evas_display_visible)(void *, bool) = NULL;
 #endif
        g_mutex_lock(&cb_info->seek_cb_mutex);
@@ -569,15 +569,17 @@ static void __seek_cb_handler(callback_cb_info_s * cb_info, _player_recv_data *r
                if (cb_info->evas_info && cb_info->evas_info->support_video) {
                        if (cb_info->evas_info->handle && cb_info->evas_info->visible != EVAS_VISIBLE_FALSE) {
                                dl_handle = dlopen(PATH_DISP_LIB, RTLD_LAZY);
-                               if (dl_handle == NULL)
+                               if (dl_handle) {
+                                       PLAYER_DISP_DLSYM(dl_handle, p_disp_set_evas_display_visible, "disp_set_evas_display_visible");
+                                       int ret = p_disp_set_evas_display_visible(cb_info->evas_info->handle, true);
+                                       dlclose(dl_handle);
+                                       if (ret != MM_ERROR_NONE)
+                                               LOGW("failed to set visible at evas 0x%x", ret);
+                                       else
+                                               cb_info->evas_info->visible = EVAS_VISIBLE_TRUE;
+                               } else {
                                        LOGW("not support video rendering");
-                               PLAYER_DISP_DLSYM(dl_handle, p_disp_set_evas_display_visible, "disp_set_evas_display_visible");
-                               int ret = p_disp_set_evas_display_visible(cb_info->evas_info->handle, true);
-                               dlclose(dl_handle);
-                               if (ret != MM_ERROR_NONE)
-                                       LOGW("failed to set visible at evas 0x%x", ret);
-                               else
-                                       cb_info->evas_info->visible = EVAS_VISIBLE_TRUE;
+                               }
                        }
                }
 #endif