aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-01-21 16:17:57 +0100
committerMax Kellermann <max@duempel.org>2009-01-21 16:17:57 +0100
commitb14e48f930c89bf2f097cf270040316e2b7a4623 (patch)
treef9ef1d5bcf79d0d2018e2ab90e9f414b9bc6e95d /src
parent2362ee4a4897502b3ccedf7af31d6d1ad89cff8e (diff)
downloadmpd-b14e48f930c89bf2f097cf270040316e2b7a4623.tar.gz
mpd-b14e48f930c89bf2f097cf270040316e2b7a4623.tar.xz
mpd-b14e48f930c89bf2f097cf270040316e2b7a4623.zip
player_thread: request next song only if new one starts playing
The player_thread loop requests the next song from the playlist as soon as the decoder finishes the song which is currently being played. This is superfluous, and can lead to synchronization errors and wrong results. The playlist already knows when the player starts playing the next song (player_wait_for_decoder() triggers the PLAYLIST event), and will then trigger the scheduler to provide the next song.
Diffstat (limited to '')
-rw-r--r--src/player_thread.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/src/player_thread.c b/src/player_thread.c
index 50d9c1a94..cc480c504 100644
--- a/src/player_thread.c
+++ b/src/player_thread.c
@@ -372,17 +372,6 @@ static void do_play(void)
*/
#endif
- if (decoder_is_idle() && !player.queued &&
- player.next_song_chunk < 0 &&
- pc.next_song != NULL &&
- pc.command == PLAYER_COMMAND_NONE) {
- /* the decoder has finished the current song;
- request the next song from the playlist */
-
- pc.next_song = NULL;
- event_pipe_emit(PIPE_EVENT_PLAYLIST);
- }
-
if (decoder_is_idle() && player.queued) {
/* the decoder has finished the current song;
make it decode the next song */