static int __player_set_retrieve_buffer_cb(player_h player, player_retrieve_buffer_cb callback, void *user_data);
static int __player_unset_retrieve_buffer_cb(player_h player);
#endif
+static void _player_release_internal_memory(player_cli_s * pc);
int _player_media_packet_finalize(media_packet_h pkt, int error_code, void *user_data)
{
LOGD("ENTER");
+ /* clear cb and release mem */
+ set_null_user_cb_lock(pc->cb_info, MUSE_PLAYER_EVENT_TYPE_SEEK);
+ set_null_user_cb_lock(pc->cb_info, MUSE_PLAYER_EVENT_TYPE_PREPARE);
+ _player_release_internal_memory(pc);
+
player_msg_send(api, pc, ret_buf, ret);
#ifdef TIZEN_FEATURE_EVAS_RENDERER
if (CALLBACK_INFO(pc) && EVAS_HANDLE(pc)) {
if (ret == PLAYER_ERROR_NONE) {
set_null_user_cb_lock(pc->cb_info, MUSE_PLAYER_EVENT_TYPE_SEEK);
set_null_user_cb_lock(pc->cb_info, MUSE_PLAYER_EVENT_TYPE_PREPARE);
- _del_mem(pc);
- _player_deinit_memory_buffer(pc);
+ _player_release_internal_memory(pc);
}
pc->cb_info->video_frame_pool_size = 0;
return ret;
}
+static void _player_release_internal_memory(player_cli_s * pc)
+{
+ if (!pc)
+ return;
+
+ _del_mem(pc);
+ _player_deinit_memory_buffer(pc);
+}
+
static int _player_deinit_memory_buffer(player_cli_s * pc)
{
PLAYER_INSTANCE_CHECK(pc);