From 3d95226f2be4950c49ec7f87156f51121ca6911d Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 15 Dec 2009 22:24:00 +0100 Subject: 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. --- src/decoder_internal.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/decoder_internal.c') 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(); -- cgit v1.2.3