aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/plugins/FlacInput.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/FlacInput.cxx
parente138e2c880d2e5ae4728bd821e3a2789cb605a11 (diff)
downloadmpd-0b4fa41aff35ac8d190e5daaeed12f12614a0e9c.tar.gz
mpd-0b4fa41aff35ac8d190e5daaeed12f12614a0e9c.tar.xz
mpd-0b4fa41aff35ac8d190e5daaeed12f12614a0e9c.zip
InputStream: "protect" attributes
Diffstat (limited to 'src/decoder/plugins/FlacInput.cxx')
-rw-r--r--src/decoder/plugins/FlacInput.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/decoder/plugins/FlacInput.cxx b/src/decoder/plugins/FlacInput.cxx
index 720b115f7..d7fc72025 100644
--- a/src/decoder/plugins/FlacInput.cxx
+++ b/src/decoder/plugins/FlacInput.cxx
@@ -47,7 +47,7 @@ FlacInput::Read(FLAC__byte buffer[], size_t *bytes)
FLAC__StreamDecoderSeekStatus
FlacInput::Seek(FLAC__uint64 absolute_byte_offset)
{
- if (!input_stream.seekable)
+ if (!input_stream.IsSeekable())
return FLAC__STREAM_DECODER_SEEK_STATUS_UNSUPPORTED;
::Error error;
@@ -62,20 +62,20 @@ FlacInput::Seek(FLAC__uint64 absolute_byte_offset)
FLAC__StreamDecoderTellStatus
FlacInput::Tell(FLAC__uint64 *absolute_byte_offset)
{
- if (!input_stream.seekable)
+ if (!input_stream.IsSeekable())
return FLAC__STREAM_DECODER_TELL_STATUS_UNSUPPORTED;
- *absolute_byte_offset = (FLAC__uint64)input_stream.offset;
+ *absolute_byte_offset = (FLAC__uint64)input_stream.GetOffset();
return FLAC__STREAM_DECODER_TELL_STATUS_OK;
}
FLAC__StreamDecoderLengthStatus
FlacInput::Length(FLAC__uint64 *stream_length)
{
- if (input_stream.size < 0)
+ if (!input_stream.KnownSize())
return FLAC__STREAM_DECODER_LENGTH_STATUS_UNSUPPORTED;
- *stream_length = (FLAC__uint64)input_stream.size;
+ *stream_length = (FLAC__uint64)input_stream.GetSize();
return FLAC__STREAM_DECODER_LENGTH_STATUS_OK;
}