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/wavpack_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/wavpack_plugin.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/decoder/wavpack_plugin.c b/src/decoder/wavpack_plugin.c index 67fa3fb44..7d649a940 100644 --- a/src/decoder/wavpack_plugin.c +++ b/src/decoder/wavpack_plugin.c @@ -475,7 +475,7 @@ wavpack_open_wvc(struct decoder *decoder, struct input_stream *is_wvc, /* * Decodes a stream. */ -static bool +static void wavpack_streamdecode(struct decoder * decoder, struct input_stream *is) { char error[ERRORLEN]; @@ -496,7 +496,7 @@ wavpack_streamdecode(struct decoder * decoder, struct input_stream *is) if (wpc == NULL) { g_warning("failed to open WavPack stream: %s\n", error); - return false; + return; } wavpack_decode(decoder, wpc, canseek, NULL); @@ -505,14 +505,12 @@ wavpack_streamdecode(struct decoder * decoder, struct input_stream *is) if (open_flags & OPEN_WVC) { input_stream_close(&is_wvc); } - - return true; } /* * Decodes a file. */ -static bool +static void wavpack_filedecode(struct decoder *decoder, const char *fname) { char error[ERRORLEN]; @@ -525,7 +523,7 @@ wavpack_filedecode(struct decoder *decoder, const char *fname) if (wpc == NULL) { g_warning("failed to open WavPack file \"%s\": %s\n", fname, error); - return false; + return; } replay_gain_info = wavpack_replaygain(wpc); @@ -537,8 +535,6 @@ wavpack_filedecode(struct decoder *decoder, const char *fname) } WavpackCloseFile(wpc); - - return true; } static char const *const wavpack_suffixes[] = { "wv", NULL }; |