diff options
author | Max Kellermann <max@duempel.org> | 2009-12-15 22:24:00 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-12-15 22:24:00 +0100 |
commit | 3d95226f2be4950c49ec7f87156f51121ca6911d (patch) | |
tree | 5440d5e3105401b226d0452b49a20c4561cfb68d /src/decoder | |
parent | b12072e6d968447a87a7a1605c574b9280810279 (diff) | |
download | mpd-3d95226f2be4950c49ec7f87156f51121ca6911d.tar.gz mpd-3d95226f2be4950c49ec7f87156f51121ca6911d.tar.xz mpd-3d95226f2be4950c49ec7f87156f51121ca6911d.zip |
decoder_internal: decoder_input_buffer() returns bool
This fixes a regression: a boolean value was returned from
decoder_input_buffer(), but the caller chose to do a "<= 0"
comparison.
Diffstat (limited to '')
-rw-r--r-- | src/decoder_internal.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/decoder_internal.c b/src/decoder_internal.c index 60c43e679..cc4d4419f 100644 --- a/src/decoder_internal.c +++ b/src/decoder_internal.c @@ -34,16 +34,16 @@ * calling input_stream_buffer(). We shouldn't hold the lock during a * potentially blocking operation. */ -static int +static bool decoder_input_buffer(struct decoder_control *dc, struct input_stream *is) { int ret; decoder_unlock(dc); - ret = input_stream_buffer(is) > 0; + ret = input_stream_buffer(is); decoder_lock(dc); - return ret; + return ret > 0; } /** @@ -57,7 +57,7 @@ need_chunks(struct decoder_control *dc, struct input_stream *is, bool do_wait) dc->command == DECODE_COMMAND_SEEK) return dc->command; - if ((is == NULL || decoder_input_buffer(dc, is) <= 0) && do_wait) { + if ((is == NULL || !decoder_input_buffer(dc, is)) && do_wait) { decoder_wait(dc); player_signal(); |