aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/plugins/WavpackDecoderPlugin.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-05-11 18:34:09 +0200
committerMax Kellermann <max@duempel.org>2014-05-12 18:59:46 +0200
commit0b4fa41aff35ac8d190e5daaeed12f12614a0e9c (patch)
tree02da5a37e93198e969a28072b555595292ce688b /src/decoder/plugins/WavpackDecoderPlugin.cxx
parente138e2c880d2e5ae4728bd821e3a2789cb605a11 (diff)
downloadmpd-0b4fa41aff35ac8d190e5daaeed12f12614a0e9c.tar.gz
mpd-0b4fa41aff35ac8d190e5daaeed12f12614a0e9c.tar.xz
mpd-0b4fa41aff35ac8d190e5daaeed12f12614a0e9c.zip
InputStream: "protect" attributes
Diffstat (limited to '')
-rw-r--r--src/decoder/plugins/WavpackDecoderPlugin.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/decoder/plugins/WavpackDecoderPlugin.cxx b/src/decoder/plugins/WavpackDecoderPlugin.cxx
index eb15a3380..d3b161adf 100644
--- a/src/decoder/plugins/WavpackDecoderPlugin.cxx
+++ b/src/decoder/plugins/WavpackDecoderPlugin.cxx
@@ -377,7 +377,7 @@ wavpack_input_read_bytes(void *id, void *data, int32_t bcount)
static uint32_t
wavpack_input_get_pos(void *id)
{
- return wpin(id)->is->offset;
+ return wpin(id)->is->GetOffset();
}
static int
@@ -406,16 +406,16 @@ wavpack_input_push_back_byte(void *id, int c)
static uint32_t
wavpack_input_get_length(void *id)
{
- if (wpin(id)->is->size < 0)
+ if (!wpin(id)->is->KnownSize())
return 0;
- return wpin(id)->is->size;
+ return wpin(id)->is->GetSize();
}
static int
wavpack_input_can_seek(void *id)
{
- return wpin(id)->is->seekable;
+ return wpin(id)->is->IsSeekable();
}
static WavpackStreamReader mpd_is_reader = {
@@ -484,7 +484,7 @@ static void
wavpack_streamdecode(Decoder &decoder, InputStream &is)
{
int open_flags = OPEN_NORMALIZE;
- bool can_seek = is.seekable;
+ bool can_seek = is.IsSeekable();
wavpack_input isp_wvc;
InputStream *is_wvc = wavpack_open_wvc(decoder, is.GetURI(),
@@ -492,7 +492,7 @@ wavpack_streamdecode(Decoder &decoder, InputStream &is)
&isp_wvc);
if (is_wvc != nullptr) {
open_flags |= OPEN_WVC;
- can_seek &= is_wvc->seekable;
+ can_seek &= is_wvc->IsSeekable();
}
if (!can_seek) {