diff options
author | Max Kellermann <max@duempel.org> | 2008-11-11 17:13:44 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-11-11 17:13:44 +0100 |
commit | 9eed41911f5b65bb51d2395388439918e799cade (patch) | |
tree | 7d9ce92fe427b7049fc50087923b5fa8ecb53eff /src/decoder/mp3_plugin.c | |
parent | 05e69ac0868658411123f8c549b7f34c2c478742 (diff) | |
download | mpd-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/mp3_plugin.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/decoder/mp3_plugin.c b/src/decoder/mp3_plugin.c index 4ae6cd744..8b63eec9d 100644 --- a/src/decoder/mp3_plugin.c +++ b/src/decoder/mp3_plugin.c @@ -1050,7 +1050,7 @@ static void mp3_audio_format(struct mp3_data *data, struct audio_format *af) af->channels = MAD_NCHANNELS(&(data->frame).header); } -static bool +static void mp3_decode(struct decoder *decoder, struct input_stream *input_stream) { struct mp3_data data; @@ -1059,12 +1059,10 @@ mp3_decode(struct decoder *decoder, struct input_stream *input_stream) struct audio_format audio_format; if (!mp3_open(input_stream, &data, decoder, &tag, &replay_gain_info)) { - if (decoder_get_command(decoder) == DECODE_COMMAND_NONE) { + if (decoder_get_command(decoder) == DECODE_COMMAND_NONE) ERROR ("Input does not appear to be a mp3 bit stream.\n"); - return false; - } - return true; + return; } mp3_audio_format(&data, &audio_format); @@ -1087,7 +1085,6 @@ mp3_decode(struct decoder *decoder, struct input_stream *input_stream) decoder_command_finished(decoder); mp3_data_finish(&data); - return true; } static struct tag *mp3_tag_dup(const char *file) |