diff --git a/src/DecoderBuffer.cxx b/src/DecoderBuffer.cxx index 0b326a6fd..78a2ccdc6 100644 --- a/src/DecoderBuffer.cxx +++ b/src/DecoderBuffer.cxx @@ -70,6 +70,12 @@ decoder_buffer_free(DecoderBuffer *buffer) g_free(buffer); } +const InputStream & +decoder_buffer_get_stream(const DecoderBuffer *buffer) +{ + return *buffer->is; +} + bool decoder_buffer_is_empty(const DecoderBuffer *buffer) { diff --git a/src/DecoderBuffer.hxx b/src/DecoderBuffer.hxx index d09416b06..0eaf0c4f3 100644 --- a/src/DecoderBuffer.hxx +++ b/src/DecoderBuffer.hxx @@ -52,6 +52,10 @@ decoder_buffer_new(Decoder *decoder, InputStream &is, void decoder_buffer_free(DecoderBuffer *buffer); +gcc_pure +const InputStream & +decoder_buffer_get_stream(const DecoderBuffer *buffer); + gcc_pure bool decoder_buffer_is_empty(const DecoderBuffer *buffer);