From 5c19776f2fc1416dab1da2f2baae9a0c764df965 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 26 Oct 2008 20:56:46 +0100 Subject: input_stream: use "bool" instead of "int" For boolean values and success flags, use bool instead of integer (1/0 for true/false, 0/-1 for success/failure). --- src/decoder/mp4_plugin.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/decoder/mp4_plugin.c') diff --git a/src/decoder/mp4_plugin.c b/src/decoder/mp4_plugin.c index b5197bb3b..a9fa061d0 100644 --- a/src/decoder/mp4_plugin.c +++ b/src/decoder/mp4_plugin.c @@ -75,7 +75,8 @@ static uint32_t mp4_inputStreamReadCallback(void *inStream, void *buffer, static uint32_t mp4_inputStreamSeekCallback(void *inStream, uint64_t position) { return input_stream_seek((struct input_stream *) inStream, - position, SEEK_SET); + position, SEEK_SET) + ? 0 : -1; } static int @@ -317,7 +318,7 @@ static struct tag *mp4DataDup(char *file, int *mp4MetadataFound) *mp4MetadataFound = 0; - if (input_stream_open(&inStream, file) < 0) { + if (!input_stream_open(&inStream, file)) { DEBUG("mp4DataDup: Failed to open file: %s\n", file); return NULL; } -- cgit v1.2.3