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().
This commit is contained in:
Max Kellermann 2008-11-13 14:43:19 +01:00
parent 3eb9b3218d
commit 2dacd16b5b
1 changed files with 3 additions and 0 deletions

View File

@ -168,6 +168,9 @@ need_chunks(struct input_stream *is, bool wait)
if ((is == NULL || input_stream_buffer(is) <= 0) && wait) { if ((is == NULL || input_stream_buffer(is) <= 0) && wait) {
notify_wait(&dc.notify); notify_wait(&dc.notify);
notify_signal(&pc.notify); notify_signal(&pc.notify);
if (dc.command != DECODE_COMMAND_STOP)
return dc.command;
} }
return DECODE_COMMAND_NONE; return DECODE_COMMAND_NONE;