Revert "player/Thread: remove unnecessary "pipe" check"

This reverts commit ff3e2c0514.  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
This commit is contained in:
Max Kellermann 2019-05-31 17:23:12 +02:00
parent 0f488dcecf
commit 304d45b551
2 changed files with 2 additions and 1 deletions

1
NEWS
View File

@ -1,4 +1,5 @@
ver 0.21.10 (not yet released)
* fix crash bug (0.21.9 regression)
ver 0.21.9 (2019/05/20)
* input

View File

@ -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 */