aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/mpc_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/mpc_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 '')
-rw-r--r--src/decoder/mpc_plugin.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/decoder/mpc_plugin.c b/src/decoder/mpc_plugin.c
index 02b20a942..584b9fed6 100644
--- a/src/decoder/mpc_plugin.c
+++ b/src/decoder/mpc_plugin.c
@@ -96,7 +96,7 @@ static inline int32_t convertSample(MPC_SAMPLE_FORMAT sample)
return val;
}
-static bool
+static void
mpc_decode(struct decoder *mpd_decoder, struct input_stream *inStream)
{
mpc_decoder decoder;
@@ -135,21 +135,17 @@ mpc_decode(struct decoder *mpd_decoder, struct input_stream *inStream)
mpc_streaminfo_init(&info);
if ((ret = mpc_streaminfo_read(&info, &reader)) != ERROR_CODE_OK) {
- if (decoder_get_command(mpd_decoder) != DECODE_COMMAND_STOP) {
+ if (decoder_get_command(mpd_decoder) != DECODE_COMMAND_STOP)
ERROR("Not a valid musepack stream\n");
- return false;
- }
- return true;
+ return;
}
mpc_decoder_setup(&decoder, &reader);
if (!mpc_decoder_initialize(&decoder, &info)) {
- if (decoder_get_command(mpd_decoder) != DECODE_COMMAND_STOP) {
+ if (decoder_get_command(mpd_decoder) != DECODE_COMMAND_STOP)
ERROR("Not a valid musepack stream\n");
- return false;
- }
- return true;
+ return;
}
audio_format.bits = 24;
@@ -232,8 +228,6 @@ mpc_decode(struct decoder *mpd_decoder, struct input_stream *inStream)
}
replay_gain_info_free(replayGainInfo);
-
- return true;
}
static float mpcGetTime(const char *file)