aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/oggvorbis_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/oggvorbis_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/oggvorbis_plugin.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/decoder/oggvorbis_plugin.c b/src/decoder/oggvorbis_plugin.c
index e707c4013..965242f10 100644
--- a/src/decoder/oggvorbis_plugin.c
+++ b/src/decoder/oggvorbis_plugin.c
@@ -196,7 +196,7 @@ static void putOggCommentsIntoOutputBuffer(struct decoder *decoder,
}
/* public */
-static bool
+static void
oggvorbis_decode(struct decoder *decoder, struct input_stream *inStream)
{
OggVorbis_File vf;
@@ -217,7 +217,7 @@ oggvorbis_decode(struct decoder *decoder, struct input_stream *inStream)
bool initialized = false;
if (ogg_stream_type_detect(inStream) != VORBIS)
- return false;
+ return;
/* rewind the stream, because ogg_stream_type_detect() has
moved it */
@@ -232,7 +232,7 @@ oggvorbis_decode(struct decoder *decoder, struct input_stream *inStream)
callbacks.tell_func = ogg_tell_cb;
if ((ret = ov_open_callbacks(&data, &vf, NULL, 0, callbacks)) < 0) {
if (decoder_get_command(decoder) != DECODE_COMMAND_NONE)
- return true;
+ return;
switch (ret) {
case OV_EREAD:
@@ -256,7 +256,7 @@ oggvorbis_decode(struct decoder *decoder, struct input_stream *inStream)
}
ERROR("Error decoding Ogg Vorbis stream: %s\n",
errorStr);
- return false;
+ return;
}
audio_format.bits = 16;
@@ -336,7 +336,6 @@ oggvorbis_decode(struct decoder *decoder, struct input_stream *inStream)
replay_gain_info_free(replayGainInfo);
ov_clear(&vf);
- return true;
}
static struct tag *oggvorbis_TagDup(const char *file)