aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/oggflac_plugin.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-11-11 17:17:06 +0100
committerMax Kellermann <max@duempel.org>2008-11-11 17:17:06 +0100
commit81d2076bcffd78ab8b6cb1bdf13b07d863e977b8 (patch)
treedb2cfb501ce37c57efa1491a86f783e5c0d8ae48 /src/decoder/oggflac_plugin.c
parent9eed41911f5b65bb51d2395388439918e799cade (diff)
downloadmpd-81d2076bcffd78ab8b6cb1bdf13b07d863e977b8.tar.gz
mpd-81d2076bcffd78ab8b6cb1bdf13b07d863e977b8.tar.xz
mpd-81d2076bcffd78ab8b6cb1bdf13b07d863e977b8.zip
oggflac: removed the obsolete try_decode() method
Diffstat (limited to 'src/decoder/oggflac_plugin.c')
-rw-r--r--src/decoder/oggflac_plugin.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/decoder/oggflac_plugin.c b/src/decoder/oggflac_plugin.c
index 6199f72ae..b9ef13722 100644
--- a/src/decoder/oggflac_plugin.c
+++ b/src/decoder/oggflac_plugin.c
@@ -279,17 +279,15 @@ static struct tag *oggflac_TagDup(const char *file)
return data.tag;
}
-static bool oggflac_try_decode(struct input_stream *inStream)
-{
- return ogg_stream_type_detect(inStream) == FLAC;
-}
-
static void
oggflac_decode(struct decoder * mpd_decoder, struct input_stream *inStream)
{
OggFLAC__SeekableStreamDecoder *decoder = NULL;
FlacData data;
+ if (ogg_stream_type_detect(inStream) != FLAC)
+ return;
+
init_FlacData(&data, mpd_decoder, inStream);
if (!(decoder = full_decoder_init_and_read_metadata(&data, 0))) {
@@ -339,7 +337,6 @@ static const char *const oggflac_mime_types[] = {
const struct decoder_plugin oggflacPlugin = {
.name = "oggflac",
- .try_decode = oggflac_try_decode,
.stream_decode = oggflac_decode,
.tag_dup = oggflac_TagDup,
.suffixes = oggflac_Suffixes,