From 0b4fa41aff35ac8d190e5daaeed12f12614a0e9c Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 11 May 2014 18:34:09 +0200 Subject: InputStream: "protect" attributes --- src/decoder/plugins/OpusDecoderPlugin.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/decoder/plugins/OpusDecoderPlugin.cxx') 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)) -- cgit v1.2.3