diff options
author | Max Kellermann <max@musicpd.org> | 2019-05-31 17:23:12 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2019-05-31 17:23:12 +0200 |
commit | 304d45b55133856fc1bff4826f6d548d90b85cb5 (patch) | |
tree | e4863516d40132916ec3bd460eb1ec9cc7b4ce33 /src | |
parent | 0f488dcecfb0c43134f15cfb2e6368845dcf3d8d (diff) |
Revert "player/Thread: remove unnecessary "pipe" check"
This reverts commit ff3e2c05142c94efadee00812ec348c15f1be1ba. The
check was necessary, after all, because this is what checked whether
the decoder had finished the current or the next song.
> The "queued" flag can only possibly be set if the decoder is still
> decoding the current song or if the decoder is stopped.
That was wrong because ProcessCommand() sets `queued=true` and also
starts the decoder (if it was idle).
> This is also what the following assert() checks.
That was also wrong, because the assert() has two conditions.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/566
Diffstat (limited to 'src')
-rw-r--r-- | src/player/Thread.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/player/Thread.cxx b/src/player/Thread.cxx index 7d81011f6..028842b61 100644 --- a/src/player/Thread.cxx +++ b/src/player/Thread.cxx @@ -996,7 +996,7 @@ Player::Run() noexcept } } - if (dc.IsIdle() && queued) { + if (dc.IsIdle() && queued && IsDecoderAtCurrentSong()) { /* the decoder has finished the current song; make it decode the next song */ |