Skip to content

Commit

Permalink
fix deadlock caused by blocking cb method
Browse files Browse the repository at this point in the history
  • Loading branch information
FernetMenta committed Mar 18, 2018
1 parent da3fc05 commit c2e31c4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 7 additions & 2 deletions xbmc/Application.cpp
Expand Up @@ -3352,15 +3352,16 @@ void CApplication::OnPlayBackStopped()
data["end"] = false;
CAnnouncementManager::GetInstance().Announce(Player, "xbmc", "OnStop", m_itemCurrentFile, data);

CGUIMessage msg( GUI_MSG_PLAYBACK_STOPPED, 0, 0 );
CGUIMessage msg(GUI_MSG_PLAYBACK_STOPPED, 0, 0);
g_windowManager.SendThreadMessage(msg);
}

void CApplication::OnPlayBackError()
{
//@todo Playlists can be continued by calling OnPlaybackEnded instead
// open error dialog
HELPERS::ShowOKDialogText(CVariant{16026}, CVariant{16027});
CGUIMessage msg(GUI_MSG_PLAYBACK_ERROR, 0, 0);
g_windowManager.SendThreadMessage(msg);
OnPlayBackStopped();
}

Expand Down Expand Up @@ -4044,6 +4045,10 @@ bool CApplication::OnMessage(CGUIMessage& message)
}
break;

case GUI_MSG_PLAYBACK_ERROR:
HELPERS::ShowOKDialogText(CVariant{16026}, CVariant{16027});
return true;

case GUI_MSG_PLAYLISTPLAYER_STARTED:
case GUI_MSG_PLAYLISTPLAYER_CHANGED:
{
Expand Down
2 changes: 2 additions & 0 deletions xbmc/GUIUserMessages.h
Expand Up @@ -139,3 +139,5 @@

// Send to RDS Radiotext handlers to inform about changed data
#define GUI_MSG_UPDATE_RADIOTEXT GUI_MSG_USER + 41

#define GUI_MSG_PLAYBACK_ERROR GUI_MSG_USER + 42

0 comments on commit c2e31c4

Please sign in to comment.