From 2dacd16b5b80f03bcb9dfda819b6796cc1ca674e Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 13 Nov 2008 14:43:19 +0100 Subject: 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(). --- src/decoder_api.c | 3 +++ 1 file changed, 3 insertions(+) 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; -- cgit v1.2.3