diff options
author | Max Kellermann <max@duempel.org> | 2013-10-17 09:43:55 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-10-17 10:45:10 +0200 |
commit | 05de2e998c7df2757ae63ce6a053e27eca3d13ca (patch) | |
tree | 2c85c43cb69dc2dc7086bfddc66090928cd0d93f /src/input/RewindInputPlugin.cxx | |
parent | 24780d99e61af44141e8f0d0d0776a1c994e6770 (diff) | |
download | mpd-05de2e998c7df2757ae63ce6a053e27eca3d13ca.tar.gz mpd-05de2e998c7df2757ae63ce6a053e27eca3d13ca.tar.xz mpd-05de2e998c7df2757ae63ce6a053e27eca3d13ca.zip |
InputStream: use int64_t instead of goffset
Decouple some more from GLib.
Diffstat (limited to '')
-rw-r--r-- | src/input/RewindInputPlugin.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/input/RewindInputPlugin.cxx b/src/input/RewindInputPlugin.cxx index 2088d8eea..567fb6888 100644 --- a/src/input/RewindInputPlugin.cxx +++ b/src/input/RewindInputPlugin.cxx @@ -164,7 +164,7 @@ input_rewind_read(struct input_stream *is, void *ptr, size_t size, size_t nbytes = r->input->Read(ptr, size, error); - if (r->input->offset > (goffset)sizeof(r->buffer)) + if (r->input->offset > (InputPlugin::offset_type)sizeof(r->buffer)) /* disable buffering */ r->tail = 0; else if (r->tail == (size_t)is->offset) { @@ -191,14 +191,16 @@ input_rewind_eof(struct input_stream *is) } static bool -input_rewind_seek(struct input_stream *is, goffset offset, int whence, +input_rewind_seek(struct input_stream *is, InputPlugin::offset_type offset, + int whence, Error &error) { RewindInputStream *r = (RewindInputStream *)is; assert(is->ready); - if (whence == SEEK_SET && r->tail > 0 && offset <= (goffset)r->tail) { + if (whence == SEEK_SET && r->tail > 0 && + offset <= (InputPlugin::offset_type)r->tail) { /* buffered seek */ assert(!r->ReadingFromBuffer() || |