diff options
author | Max Kellermann <max@duempel.org> | 2009-01-17 15:23:57 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-01-17 15:23:57 +0100 |
commit | 7f3be96efa222aba1661adf2fc83a0e60e8b9aef (patch) | |
tree | e06d23ee662f7f113dde20fefd1d7e8f7397d2f3 /src/decoder_api.c | |
parent | 5395f5f6b34b6a98e94c8f3e8329150a2a4b9cac (diff) | |
download | mpd-7f3be96efa222aba1661adf2fc83a0e60e8b9aef.tar.gz mpd-7f3be96efa222aba1661adf2fc83a0e60e8b9aef.tar.xz mpd-7f3be96efa222aba1661adf2fc83a0e60e8b9aef.zip |
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.
Diffstat (limited to '')
-rw-r--r-- | src/decoder_api.c | 3 |
1 files changed, 1 insertions, 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; |