aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-11-13 14:43:19 +0100
committerMax Kellermann <max@duempel.org>2008-11-13 14:43:19 +0100
commit2dacd16b5b80f03bcb9dfda819b6796cc1ca674e (patch)
treedd5d5476fdae701dcc3d09129958bd6d9f55b79a
parent3eb9b3218da5652489faf90ff80241983843b7be (diff)
downloadmpd-2dacd16b5b80f03bcb9dfda819b6796cc1ca674e.tar.gz
mpd-2dacd16b5b80f03bcb9dfda819b6796cc1ca674e.tar.xz
mpd-2dacd16b5b80f03bcb9dfda819b6796cc1ca674e.zip
decoder: additional dc.command checks in decoder_data()
When a command is sent while the decoder waits for a free chunk in the music pipe, it was not returned by decoder_data().
-rw-r--r--src/decoder_api.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/decoder_api.c b/src/decoder_api.c
index ab8a5f961..08e6b1956 100644
--- a/src/decoder_api.c
+++ b/src/decoder_api.c
@@ -168,6 +168,9 @@ need_chunks(struct input_stream *is, bool wait)
if ((is == NULL || input_stream_buffer(is) <= 0) && wait) {
notify_wait(&dc.notify);
notify_signal(&pc.notify);
+
+ if (dc.command != DECODE_COMMAND_STOP)
+ return dc.command;
}
return DECODE_COMMAND_NONE;