From 9eed41911f5b65bb51d2395388439918e799cade Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 11 Nov 2008 17:13:44 +0100 Subject: 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. --- src/decoder/mp3_plugin.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/decoder/mp3_plugin.c') 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) -- cgit v1.2.3