aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-08-26 08:27:14 +0200
committerMax Kellermann <max@duempel.org>2008-08-26 08:27:14 +0200
commitd80260ab4e1d4f926344ab2074543ea4a7723216 (patch)
tree49b64ccc809b7975f5e226b3121ff7735fa4867a
parenta1b430cb882cc00cf2e0f0f7b650a39acc125c8e (diff)
downloadmpd-d80260ab4e1d4f926344ab2074543ea4a7723216.tar.gz
mpd-d80260ab4e1d4f926344ab2074543ea4a7723216.tar.xz
mpd-d80260ab4e1d4f926344ab2074543ea4a7723216.zip
wavpack: added InputStreamPlus.decoder
The "decoder" object reference will be used by another patch.
-rw-r--r--src/inputPlugins/wavpack_plugin.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/inputPlugins/wavpack_plugin.c b/src/inputPlugins/wavpack_plugin.c
index 9085ff88a..00aa09993 100644
--- a/src/inputPlugins/wavpack_plugin.c
+++ b/src/inputPlugins/wavpack_plugin.c
@@ -340,6 +340,7 @@ static MpdTag *wavpack_tagdup(char *fname)
/* This struct is needed for per-stream last_byte storage. */
typedef struct {
+ struct decoder *decoder;
InputStream *is;
/* Needed for push_back_byte() */
int last_byte;
@@ -403,8 +404,10 @@ static WavpackStreamReader mpd_is_reader = {
};
static void
-initInputStreamPlus(InputStreamPlus *isp, InputStream *is)
+initInputStreamPlus(InputStreamPlus *isp, struct decoder *decoder,
+ InputStream *is)
{
+ isp->decoder = decoder;
isp->is = is;
isp->last_byte = EOF;
}
@@ -418,7 +421,7 @@ static unsigned int wavpack_trydecode(InputStream *is)
WavpackContext *wpc;
InputStreamPlus isp;
- initInputStreamPlus(&isp, is);
+ initInputStreamPlus(&isp, NULL, is);
wpc = WavpackOpenFileInputEx(&mpd_is_reader, &isp, NULL, error,
OPEN_STREAMING, 0);
if (wpc == NULL)
@@ -520,11 +523,11 @@ static int wavpack_streamdecode(struct decoder * decoder, InputStream *is)
free(wvc_url);
wvc_url = NULL;
} else {
- initInputStreamPlus(&isp_wvc, &is_wvc);
+ initInputStreamPlus(&isp_wvc, decoder, &is_wvc);
}
}
- initInputStreamPlus(&isp, is);
+ initInputStreamPlus(&isp, decoder, is);
wpc = WavpackOpenFileInputEx(&mpd_is_reader, &isp, &isp_wvc, error,
open_flags, 15);