diff options
author | Garrett Brown <themagnificentmrb@gmail.com> | 2018-10-02 16:24:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-02 16:24:17 +0200 |
commit | 8777af54995a770cd8f79f5f0d36792063f63faa (patch) | |
tree | daf0a9356632e1ef9e8e78d0ab91ad4c48cce045 | |
parent | 65f5fbb64432c25bab16fdaa619576ef5adfb533 (diff) | |
parent | 30b7b4fc38c064401895e25802c13c8b6ea68e9d (diff) |
Merge pull request #14478 from garbear/fix-vp-stuck
Fix getting stuck using VideoPlayer and breaking game launching
-rw-r--r-- | xbmc/Application.cpp | 1 | ||||
-rw-r--r-- | xbmc/ApplicationPlayer.cpp | 11 | ||||
-rw-r--r-- | xbmc/ApplicationPlayer.h | 1 |
3 files changed, 10 insertions, 3 deletions
diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp index 8bc0655830..1e6b9bca8a 100644 --- a/xbmc/Application.cpp +++ b/xbmc/Application.cpp @@ -3281,6 +3281,7 @@ void CApplication::PlaybackCleanup() if (!m_appPlayer.IsPlaying()) { m_stackHelper.Clear(); + m_appPlayer.ResetPlayer(); } if (IsEnableTestMode()) diff --git a/xbmc/ApplicationPlayer.cpp b/xbmc/ApplicationPlayer.cpp index b243b53f15..e310c2586f 100644 --- a/xbmc/ApplicationPlayer.cpp +++ b/xbmc/ApplicationPlayer.cpp @@ -37,12 +37,17 @@ void CApplicationPlayer::ClosePlayer() if (player) { CloseFile(); - // we need to do this directly on the member - CSingleLock lock(m_playerLock); - m_pPlayer.reset(); + ResetPlayer(); } } +void CApplicationPlayer::ResetPlayer() +{ + // we need to do this directly on the member + CSingleLock lock(m_playerLock); + m_pPlayer.reset(); +} + void CApplicationPlayer::CloseFile(bool reopen) { std::shared_ptr<IPlayer> player = GetInternal(); diff --git a/xbmc/ApplicationPlayer.h b/xbmc/ApplicationPlayer.h index df2e77d50f..8ddf5dd3e8 100644 --- a/xbmc/ApplicationPlayer.h +++ b/xbmc/ApplicationPlayer.h @@ -35,6 +35,7 @@ public: // player management void ClosePlayer(); + void ResetPlayer(); std::string GetCurrentPlayer(); float GetPlaySpeed(); float GetPlayTempo(); |