fix to unset decoded_cb for evas client 29/68229/3
authorNAMJEONGYOON <just.nam@samsung.com>
Tue, 3 May 2016 05:42:55 +0000 (14:42 +0900)
committerNAMJEONGYOON <just.nam@samsung.com>
Tue, 3 May 2016 10:03:41 +0000 (19:03 +0900)
Change-Id: If8d54ca596f35b0865353590c782227f9aceb6b6
Signed-off-by: NAMJEONGYOON <just.nam@samsung.com>
src/player.c

index dce0e4f..2fb75fa 100644 (file)
@@ -1232,6 +1232,12 @@ int player_destroy(player_h player)
 
        player_msg_send(api, pc, ret_buf, ret);
 
+       if (EVAS_HANDLE(pc)) {
+               player_unset_media_packet_video_frame_decoded_cb(player);
+               if (mm_evas_renderer_destroy(&EVAS_HANDLE(pc)) != MM_ERROR_NONE)
+                       LOGW("fail to unset evas client");
+       }
+
        if (pc->cb_info && pc->cb_info->packet_list) {
                g_mutex_lock(&pc->cb_info->packet_list_mutex);
                LOGW("num of remained packets : %d !!", g_list_length(pc->cb_info->packet_list));
@@ -1324,10 +1330,11 @@ int player_unprepare(player_h player)
        if (!CALLBACK_INFO(pc))
                return PLAYER_ERROR_INVALID_STATE;
 
-       if (mm_evas_renderer_destroy(&EVAS_HANDLE(pc)) != MM_ERROR_NONE) {
-               LOGW("fail to unset evas client");
+       if (EVAS_HANDLE(pc)) {
+               player_unset_media_packet_video_frame_decoded_cb(player);
+               if (mm_evas_renderer_destroy(&EVAS_HANDLE(pc)) != MM_ERROR_NONE)
+                       LOGW("fail to unset evas client");
        }
-
        player_msg_send(api, pc, ret_buf, ret);
        if (ret == PLAYER_ERROR_NONE) {
                set_null_user_cb_lock(pc->cb_info, MUSE_PLAYER_EVENT_TYPE_SEEK);