From 7f3be96efa222aba1661adf2fc83a0e60e8b9aef Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 17 Jan 2009 15:23:57 +0100 Subject: 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. --- src/decoder_api.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/decoder_api.c b/src/decoder_api.c index a06eb8364..7178e7496 100644 --- a/src/decoder_api.c +++ b/src/decoder_api.c @@ -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; -- cgit v1.2.3