From b14e48f930c89bf2f097cf270040316e2b7a4623 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 21 Jan 2009 16:17:57 +0100 Subject: 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. --- src/player_thread.c | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'src/player_thread.c') 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 */ -- cgit v1.2.3