diff options
author | Max Kellermann <max@duempel.org> | 2008-10-30 08:38:54 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-10-30 08:38:54 +0100 |
commit | 62d4fa9306fdb5dd0a1b592fd8dbdf1b679d92ca (patch) | |
tree | 565dd0a8c2c50a31dac369408e6b499eb7daafb5 /src/decoder/ffmpeg_plugin.c | |
parent | d29bad441066919f808c4ad1657bc5600fd9bd45 (diff) | |
download | mpd-62d4fa9306fdb5dd0a1b592fd8dbdf1b679d92ca.tar.gz mpd-62d4fa9306fdb5dd0a1b592fd8dbdf1b679d92ca.tar.xz mpd-62d4fa9306fdb5dd0a1b592fd8dbdf1b679d92ca.zip |
decoder: use bool for return values and flags
Don't return 0/-1 on success/error, but true/false. Instead of int,
use bool for storing flags.
Diffstat (limited to '')
-rw-r--r-- | src/decoder/ffmpeg_plugin.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/decoder/ffmpeg_plugin.c b/src/decoder/ffmpeg_plugin.c index e8947778b..26af540b0 100644 --- a/src/decoder/ffmpeg_plugin.c +++ b/src/decoder/ffmpeg_plugin.c @@ -84,7 +84,7 @@ static int mpdurl_read(URLContext *h, unsigned char *buf, int size) { int ret; FopsHelper *base = (FopsHelper *) h->priv_data; - while (1) { + while (true) { ret = input_stream_read(base->input, (void *)buf, size); if (ret == 0) { DEBUG("ret 0\n"); @@ -130,11 +130,11 @@ static URLProtocol mpdurl_fileops = { .url_close = mpdurl_close, }; -static int ffmpeg_init(void) +static bool ffmpeg_init(void) { av_register_all(); register_protocol(&mpdurl_fileops); - return 0; + return true; } static int @@ -318,18 +318,18 @@ static int ffmpeg_decode_internal(BasePtrs *base) return 0; } -static int +static bool ffmpeg_decode(struct decoder *decoder, struct input_stream *input) { BasePtrs base; - int ret; + bool ret; DEBUG("decode start\n"); base.input = input; base.decoder = decoder; - ret = ffmpeg_helper(input, ffmpeg_decode_internal, &base); + ret = ffmpeg_helper(input, ffmpeg_decode_internal, &base) == 0; DEBUG("decode finish\n"); |