aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/aac_plugin.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-11-11 17:13:44 +0100
committerMax Kellermann <max@duempel.org>2008-11-11 17:13:44 +0100
commit9eed41911f5b65bb51d2395388439918e799cade (patch)
tree7d9ce92fe427b7049fc50087923b5fa8ecb53eff /src/decoder/aac_plugin.c
parent05e69ac0868658411123f8c549b7f34c2c478742 (diff)
downloadmpd-9eed41911f5b65bb51d2395388439918e799cade.tar.gz
mpd-9eed41911f5b65bb51d2395388439918e799cade.tar.xz
mpd-9eed41911f5b65bb51d2395388439918e799cade.zip
decoder: return void from decode() methods
The stream_decode() and file_decode() methods returned a boolean, indicating whether they were able to decode the song. This is redundant, since we already know that: if decoder_initialized() has been called (and dc.state==DECODE), the plugin succeeded. Change both methods to return void.
Diffstat (limited to 'src/decoder/aac_plugin.c')
-rw-r--r--src/decoder/aac_plugin.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/src/decoder/aac_plugin.c b/src/decoder/aac_plugin.c
index 81ad90e69..7847a0f98 100644
--- a/src/decoder/aac_plugin.c
+++ b/src/decoder/aac_plugin.c
@@ -301,7 +301,7 @@ static int getAacTotalTime(const char *file)
return file_time;
}
-static bool
+static void
aac_stream_decode(struct decoder *mpd_decoder, struct input_stream *inStream)
{
float file_time;
@@ -354,7 +354,7 @@ aac_stream_decode(struct decoder *mpd_decoder, struct input_stream *inStream)
faacDecClose(decoder);
if (b.buffer)
free(b.buffer);
- return false;
+ return;
}
audio_format.bits = 16;
@@ -419,15 +419,10 @@ aac_stream_decode(struct decoder *mpd_decoder, struct input_stream *inStream)
faacDecClose(decoder);
if (b.buffer)
free(b.buffer);
-
- if (!initialized)
- return false;
-
- return true;
}
-static bool
+static void
aac_decode(struct decoder *mpd_decoder, const char *path)
{
float file_time;
@@ -451,10 +446,10 @@ aac_decode(struct decoder *mpd_decoder, const char *path)
bool initialized = false;
if ((totalTime = getAacFloatTotalTime(path)) < 0)
- return false;
+ return;
if (!input_stream_open(&inStream, path))
- return false;
+ return;
initAacBuffer(&b, mpd_decoder, &inStream);
aac_parse_header(&b, NULL);
@@ -484,7 +479,7 @@ aac_decode(struct decoder *mpd_decoder, const char *path)
faacDecClose(decoder);
if (b.buffer)
free(b.buffer);
- return false;
+ return;
}
audio_format.bits = 16;
@@ -547,11 +542,6 @@ aac_decode(struct decoder *mpd_decoder, const char *path)
faacDecClose(decoder);
if (b.buffer)
free(b.buffer);
-
- if (!initialized)
- return false;
-
- return true;
}
static struct tag *aacTagDup(const char *file)