aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder
diff options
context:
space:
mode:
Diffstat (limited to '')
-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,