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/flac_plugin.c | |
parent | 05e69ac0868658411123f8c549b7f34c2c478742 (diff) |
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/flac_plugin.c')
-rw-r--r-- | src/decoder/flac_plugin.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/decoder/flac_plugin.c b/src/decoder/flac_plugin.c index c6421031b..9c93983a0 100644 --- a/src/decoder/flac_plugin.c +++ b/src/decoder/flac_plugin.c @@ -301,7 +301,7 @@ static struct tag *flacTagDup(const char *file) return ret; } -static bool +static void flac_decode_internal(struct decoder * decoder, struct input_stream *inStream, bool is_ogg) { @@ -310,7 +310,7 @@ flac_decode_internal(struct decoder * decoder, struct input_stream *inStream, const char *err = NULL; if (!(flacDec = flac_new())) - return false; + return; init_FlacData(&data, decoder, inStream); #if defined(FLAC_API_VERSION_CURRENT) && FLAC_API_VERSION_CURRENT > 7 @@ -375,15 +375,15 @@ fail: if (err) { ERROR("flac %s\n", err); - return false; + return; } - return true; + return; } -static bool +static void flac_decode(struct decoder * decoder, struct input_stream *inStream) { - return flac_decode_internal(decoder, inStream, false); + flac_decode_internal(decoder, inStream, false); } #ifndef HAVE_OGGFLAC @@ -431,17 +431,17 @@ out: return ret; } -static bool +static void oggflac_decode(struct decoder *decoder, struct input_stream *inStream) { if (ogg_stream_type_detect(inStream) != FLAC) - return false; + return; /* rewind the stream, because ogg_stream_type_detect() has moved it */ input_stream_seek(inStream, 0, SEEK_SET); - return flac_decode_internal(decoder, inStream, true); + flac_decode_internal(decoder, inStream, true); } static const char *const oggflac_suffixes[] = { "ogg", "oga", NULL }; |