diff options
author | Max Kellermann <max@duempel.org> | 2014-09-21 13:42:08 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-09-21 13:50:27 +0200 |
commit | ed708360574b250c20ef93f4f169fab221b590ae (patch) | |
tree | c7477f835c67e66de973821af0d536c8169964f8 /src/decoder | |
parent | a68e52c2e30ad2ca49ff058ef5bed1a246b033b3 (diff) | |
download | mpd-ed708360574b250c20ef93f4f169fab221b590ae.tar.gz mpd-ed708360574b250c20ef93f4f169fab221b590ae.tar.xz mpd-ed708360574b250c20ef93f4f169fab221b590ae.zip |
DecoderBuffer: convert pointer to reference
Diffstat (limited to 'src/decoder')
-rw-r--r-- | src/decoder/DecoderBuffer.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/decoder/DecoderBuffer.cxx b/src/decoder/DecoderBuffer.cxx index b2320032b..bccdf82a0 100644 --- a/src/decoder/DecoderBuffer.cxx +++ b/src/decoder/DecoderBuffer.cxx @@ -27,13 +27,13 @@ struct DecoderBuffer { Decoder *decoder; - InputStream *is; + InputStream &is; DynamicFifoBuffer<uint8_t> buffer; DecoderBuffer(Decoder *_decoder, InputStream &_is, size_t _size) - :decoder(_decoder), is(&_is), buffer(_size) {} + :decoder(_decoder), is(_is), buffer(_size) {} }; DecoderBuffer * @@ -56,7 +56,7 @@ decoder_buffer_free(DecoderBuffer *buffer) const InputStream & decoder_buffer_get_stream(const DecoderBuffer *buffer) { - return *buffer->is; + return buffer->is; } void @@ -73,7 +73,7 @@ decoder_buffer_fill(DecoderBuffer *buffer) /* buffer is full */ return false; - size_t nbytes = decoder_read(buffer->decoder, *buffer->is, + size_t nbytes = decoder_read(buffer->decoder, buffer->is, w.data, w.size); if (nbytes == 0) /* end of file, I/O error or decoder command @@ -128,5 +128,5 @@ decoder_buffer_skip(DecoderBuffer *buffer, size_t nbytes) buffer->buffer.Clear(); nbytes -= r.size; - return decoder_skip(buffer->decoder, *buffer->is, nbytes); + return decoder_skip(buffer->decoder, buffer->is, nbytes); } |