Skip to content

Commit d487ead

Browse files
author
arnova
committed
fixed: Freezing when player fails to queue the next song (fixes xbmc#14297 xbmc#14231 xbmc#14229 xbmc#13919)
1 parent bb79b32 commit d487ead

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

xbmc/Application.cpp

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5001,11 +5001,22 @@ bool CApplication::OnMessage(CGUIMessage& message)
50015001
}
50025002
#endif
50035003

5004-
// ok - send the file to the player if it wants it
5005-
if (m_pPlayer && m_pPlayer->QueueNextFile(file))
5006-
{ // player wants the next file
5007-
m_nextPlaylistItem = iNext;
5004+
// ok - send the file to the player, if it accepts it
5005+
if (m_pPlayer)
5006+
{
5007+
if (m_pPlayer->QueueNextFile(file))
5008+
{
5009+
// player accepted the next file
5010+
m_nextPlaylistItem = iNext;
5011+
}
5012+
else
5013+
{
5014+
/* Player didn't accept next file: *ALWAYS* advance playlist in this case so the player can
5015+
queue the next (if it wants to) and it doesn't keep looping on this song */
5016+
g_playlistPlayer.SetCurrentSong(iNext);
5017+
}
50085018
}
5019+
50095020
return true;
50105021
}
50115022
break;

0 commit comments

Comments
 (0)