aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-05-22 13:15:55 +0200
committerMax Kellermann <max@duempel.org>2014-05-22 13:52:00 +0200
commit374c6a27db790eb637feaeb9bd27ed82897d7953 (patch)
tree3ad68cd453376f97cca3fe432998c40d9997c1bc /src
parent36c9e95969387516c07d37039e09c737be021669 (diff)
downloadmpd-374c6a27db790eb637feaeb9bd27ed82897d7953.tar.gz
mpd-374c6a27db790eb637feaeb9bd27ed82897d7953.tar.xz
mpd-374c6a27db790eb637feaeb9bd27ed82897d7953.zip
decoder/vorbis: make VorbisInputStream::input_stream a reference
Diffstat (limited to 'src')
-rw-r--r--src/decoder/plugins/VorbisDecoderPlugin.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/decoder/plugins/VorbisDecoderPlugin.cxx b/src/decoder/plugins/VorbisDecoderPlugin.cxx
index bcc5ae787..4fe44e9e8 100644
--- a/src/decoder/plugins/VorbisDecoderPlugin.cxx
+++ b/src/decoder/plugins/VorbisDecoderPlugin.cxx
@@ -51,18 +51,18 @@
struct VorbisInputStream {
Decoder *const decoder;
- InputStream *const input_stream;
+ InputStream &input_stream;
bool seekable;
VorbisInputStream(Decoder *_decoder, InputStream &_is)
- :decoder(_decoder), input_stream(&_is),
- seekable(input_stream->CheapSeeking()) {}
+ :decoder(_decoder), input_stream(_is),
+ seekable(input_stream.CheapSeeking()) {}
};
static size_t ogg_read_cb(void *ptr, size_t size, size_t nmemb, void *data)
{
VorbisInputStream *vis = (VorbisInputStream *)data;
- size_t ret = decoder_read(vis->decoder, *vis->input_stream,
+ size_t ret = decoder_read(vis->decoder, vis->input_stream,
ptr, size * nmemb);
errno = 0;
@@ -78,7 +78,7 @@ static int ogg_seek_cb(void *data, ogg_int64_t offset, int whence)
return vis->seekable &&
(vis->decoder == nullptr ||
decoder_get_command(*vis->decoder) != DecoderCommand::STOP) &&
- vis->input_stream->LockSeek(offset, whence, error)
+ vis->input_stream.LockSeek(offset, whence, error)
? 0 : -1;
}
@@ -92,7 +92,7 @@ static long ogg_tell_cb(void *data)
{
VorbisInputStream *vis = (VorbisInputStream *)data;
- return (long)vis->input_stream->GetOffset();
+ return (long)vis->input_stream.GetOffset();
}
static const ov_callbacks vorbis_is_callbacks = {