aboutsummaryrefslogtreecommitdiffstats
path: root/src/input/CurlInputPlugin.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-10-17 09:43:55 +0200
committerMax Kellermann <max@duempel.org>2013-10-17 10:45:10 +0200
commit05de2e998c7df2757ae63ce6a053e27eca3d13ca (patch)
tree2c85c43cb69dc2dc7086bfddc66090928cd0d93f /src/input/CurlInputPlugin.cxx
parent24780d99e61af44141e8f0d0d0776a1c994e6770 (diff)
downloadmpd-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 'src/input/CurlInputPlugin.cxx')
-rw-r--r--src/input/CurlInputPlugin.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/input/CurlInputPlugin.cxx b/src/input/CurlInputPlugin.cxx
index 5a89fc1fd..6f11153ec 100644
--- a/src/input/CurlInputPlugin.cxx
+++ b/src/input/CurlInputPlugin.cxx
@@ -780,7 +780,7 @@ input_curl_read(struct input_stream *is, void *ptr, size_t size,
if (c->icy.IsDefined())
copy_icy_tag(c);
- is->offset += (goffset)nbytes;
+ is->offset += (InputPlugin::offset_type)nbytes;
if (c->paused && curl_total_buffer_size(c) < CURL_RESUME_AT) {
c->base.mutex.unlock();
@@ -977,7 +977,8 @@ input_curl_easy_init(struct input_curl *c, Error &error)
}
static bool
-input_curl_seek(struct input_stream *is, goffset offset, int whence,
+input_curl_seek(struct input_stream *is, InputPlugin::offset_type offset,
+ int whence,
Error &error)
{
struct input_curl *c = (struct input_curl *)is;
@@ -1022,7 +1023,7 @@ input_curl_seek(struct input_stream *is, goffset offset, int whence,
while (offset > is->offset && !c->buffers.empty()) {
auto &buffer = c->buffers.front();
size_t length = buffer.Available();
- if (offset - is->offset < (goffset)length)
+ if (offset - is->offset < (InputPlugin::offset_type)length)
length = offset - is->offset;
const bool empty = !buffer.Consume(length);