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/FlacInput.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/decoder/plugins/FlacInput.cxx') 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; } -- cgit v1.2.3