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.
This commit is contained in:
Max Kellermann 2009-01-17 15:23:57 +01:00
parent 5395f5f6b3
commit 7f3be96efa
1 changed files with 1 additions and 2 deletions

View File

@ -243,8 +243,7 @@ decoder_data(struct decoder *decoder,
if (dest == NULL) { if (dest == NULL) {
/* the music pipe is full: wait for more /* the music pipe is full: wait for more
room */ room */
enum decoder_command cmd = enum decoder_command cmd = need_chunks(is, true);
need_chunks(is, nbytes == 0);
if (cmd != DECODE_COMMAND_NONE) if (cmd != DECODE_COMMAND_NONE)
return cmd; return cmd;
continue; continue;