diff --git a/packages/video_player_avplay/tizen/src/drm_manager.cc b/packages/video_player_avplay/tizen/src/drm_manager.cc index d2bb54d4d..6990b3fec 100644 --- a/packages/video_player_avplay/tizen/src/drm_manager.cc +++ b/packages/video_player_avplay/tizen/src/drm_manager.cc @@ -46,6 +46,7 @@ DrmManager::~DrmManager() { ReleaseDrmSession(); if (license_request_pipe_) { ecore_pipe_del(license_request_pipe_); + license_request_pipe_ = nullptr; } if (drm_manager_proxy_) { CloseDrmManagerProxy(drm_manager_proxy_); diff --git a/packages/video_player_avplay/tizen/src/plus_player.cc b/packages/video_player_avplay/tizen/src/plus_player.cc index 8f448e3a1..c33ad39c6 100644 --- a/packages/video_player_avplay/tizen/src/plus_player.cc +++ b/packages/video_player_avplay/tizen/src/plus_player.cc @@ -39,20 +39,14 @@ PlusPlayer::PlusPlayer(flutter::BinaryMessenger *messenger, : VideoPlayer(messenger, flutter_view), video_format_(video_format) {} PlusPlayer::~PlusPlayer() { - if (!player_) { - LOG_ERROR("[PlusPlayer] Player not created."); - return; - } - if (!Stop(player_)) { - LOG_INFO("[PlusPlayer] Player fail to stop."); - return; + if (player_) { + Stop(player_); + Close(player_); + UnregisterListener(player_); + DestroyPlayer(player_); + player_ = nullptr; } - Close(player_); - UnregisterListener(player_); - DestroyPlayer(player_); - player_ = nullptr; - if (drm_manager_) { drm_manager_->ReleaseDrmSession(); }