aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/plugins/OpusDecoderPlugin.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/OpusDecoderPlugin.cxx
parente138e2c880d2e5ae4728bd821e3a2789cb605a11 (diff)
downloadmpd-0b4fa41aff35ac8d190e5daaeed12f12614a0e9c.tar.gz
mpd-0b4fa41aff35ac8d190e5daaeed12f12614a0e9c.tar.xz
mpd-0b4fa41aff35ac8d190e5daaeed12f12614a0e9c.zip
InputStream: "protect" attributes
Diffstat (limited to 'src/decoder/plugins/OpusDecoderPlugin.cxx')
-rw-r--r--src/decoder/plugins/OpusDecoderPlugin.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/decoder/plugins/OpusDecoderPlugin.cxx b/src/decoder/plugins/OpusDecoderPlugin.cxx
index 67bbe7a54..983d17278 100644
--- a/src/decoder/plugins/OpusDecoderPlugin.cxx
+++ b/src/decoder/plugins/OpusDecoderPlugin.cxx
@@ -185,7 +185,7 @@ LoadEOSPacket(InputStream &is, Decoder *decoder, int serialno,
troubl */
return -1;
- const auto old_offset = is.offset;
+ const auto old_offset = is.GetOffset();
if (old_offset < 0)
return -1;
@@ -332,16 +332,16 @@ bool
MPDOpusDecoder::Seek(OggSyncState &oy, double where_s)
{
assert(eos_granulepos > 0);
- assert(input_stream.seekable);
- assert(input_stream.size > 0);
- assert(input_stream.offset >= 0);
+ assert(input_stream.IsSeekable());
+ assert(input_stream.KnownSize());
+ assert(input_stream.GetOffset() >= 0);
const ogg_int64_t where_granulepos(where_s * opus_sample_rate);
/* interpolate the file offset where we expect to find the
given granule position */
/* TODO: implement binary search */
- InputStream::offset_type offset(where_granulepos * input_stream.size
+ InputStream::offset_type offset(where_granulepos * input_stream.GetSize()
/ eos_granulepos);
if (!OggSeekPageAtOffset(oy, os, input_stream, offset, SEEK_SET))