Commit 7f3be96e authored by Max Kellermann's avatar Max Kellermann

decoder_api: always notify_wait() for free chunks

One of the previous patches made MPD consume 100% CPU in a busy wait: when the music_pipe was full, it did not wait (with notify_wait()) for free chunks, because a variable has a different meaning now. Always pass "true" as the "wait" parameter.
parent 5395f5f6
......@@ -243,8 +243,7 @@ decoder_data(struct decoder *decoder,
if (dest == NULL) {
/* the music pipe is full: wait for more
room */
enum decoder_command cmd =
need_chunks(is, nbytes == 0);
enum decoder_command cmd = need_chunks(is, true);
if (cmd != DECODE_COMMAND_NONE)
return cmd;
continue;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment