aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/ffmpeg_plugin.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-30 08:38:54 +0100
committerMax Kellermann <max@duempel.org>2008-10-30 08:38:54 +0100
commit62d4fa9306fdb5dd0a1b592fd8dbdf1b679d92ca (patch)
tree565dd0a8c2c50a31dac369408e6b499eb7daafb5 /src/decoder/ffmpeg_plugin.c
parentd29bad441066919f808c4ad1657bc5600fd9bd45 (diff)
downloadmpd-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 'src/decoder/ffmpeg_plugin.c')
-rw-r--r--src/decoder/ffmpeg_plugin.c12
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");