aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-11-09 22:10:48 +0100
committerMax Kellermann <max@duempel.org>2008-11-09 22:10:48 +0100
commitab24e203cdcf4028eaedbe7dc701322069853ebe (patch)
treedae2b5a9bbbe51728924283793319327ac27bf31
parentb054ad0ea6fce1253fa010dd21334a3e4d96f2a9 (diff)
downloadmpd-ab24e203cdcf4028eaedbe7dc701322069853ebe.tar.gz
mpd-ab24e203cdcf4028eaedbe7dc701322069853ebe.tar.xz
mpd-ab24e203cdcf4028eaedbe7dc701322069853ebe.zip
wavpack: removed try_decode() method
Wavpack's try_decode() implementation does nothing useful, it only duplicates code already in stream_decode() / file_decode(), and slows down MPD.
-rw-r--r--src/decoder/wavpack_plugin.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/src/decoder/wavpack_plugin.c b/src/decoder/wavpack_plugin.c
index 568fd32f5..1dc496648 100644
--- a/src/decoder/wavpack_plugin.c
+++ b/src/decoder/wavpack_plugin.c
@@ -447,28 +447,6 @@ wavpack_input_init(struct wavpack_input *isp, struct decoder *decoder,
isp->last_byte = EOF;
}
-/*
- * Tries to decode the specified stream, and gives true if managed to do it.
- */
-static bool
-wavpack_trydecode(struct input_stream *is)
-{
- char error[ERRORLEN];
- WavpackContext *wpc;
- struct wavpack_input isp;
-
- wavpack_input_init(&isp, NULL, is);
- wpc = WavpackOpenFileInputEx(&mpd_is_reader, &isp, NULL, error,
- OPEN_STREAMING, 0);
- if (wpc == NULL) {
- return false;
- }
-
- WavpackCloseFile(wpc);
-
- return true;
-}
-
static bool
wavpack_open_wvc(struct decoder *decoder, struct input_stream *is_wvc,
struct wavpack_input *wpi)
@@ -588,7 +566,6 @@ static char const *const wavpack_mime_types[] = { "audio/x-wavpack", NULL };
const struct decoder_plugin wavpack_plugin = {
.name = "wavpack",
- .try_decode = wavpack_trydecode,
.stream_decode = wavpack_streamdecode,
.file_decode = wavpack_filedecode,
.tag_dup = wavpack_tagdup,