aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/DsdLib.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/decoder/DsdLib.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/decoder/DsdLib.cxx')
-rw-r--r--src/decoder/DsdLib.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/decoder/DsdLib.cxx b/src/decoder/DsdLib.cxx
index 7135c9903..491b158e6 100644
--- a/src/decoder/DsdLib.cxx
+++ b/src/decoder/DsdLib.cxx
@@ -63,7 +63,7 @@ dsdlib_read(struct decoder *decoder, struct input_stream *is,
*/
bool
dsdlib_skip_to(struct decoder *decoder, struct input_stream *is,
- goffset offset)
+ int64_t offset)
{
if (is->IsSeekable())
return is->Seek(offset, SEEK_SET, IgnoreError());
@@ -74,7 +74,7 @@ dsdlib_skip_to(struct decoder *decoder, struct input_stream *is,
char buffer[8192];
while (is->GetOffset() < offset) {
size_t length = sizeof(buffer);
- if (offset - is->GetOffset() < (goffset)length)
+ if (offset - is->GetOffset() < (int64_t)length)
length = offset - is->GetOffset();
size_t nbytes = decoder_read(decoder, is, buffer, length);
@@ -91,7 +91,7 @@ dsdlib_skip_to(struct decoder *decoder, struct input_stream *is,
*/
bool
dsdlib_skip(struct decoder *decoder, struct input_stream *is,
- goffset delta)
+ int64_t delta)
{
assert(delta >= 0);
@@ -104,7 +104,7 @@ dsdlib_skip(struct decoder *decoder, struct input_stream *is,
char buffer[8192];
while (delta > 0) {
size_t length = sizeof(buffer);
- if ((goffset)length > delta)
+ if ((int64_t)length > delta)
length = delta;
size_t nbytes = decoder_read(decoder, is, buffer, length);
@@ -126,7 +126,7 @@ dsdlib_skip(struct decoder *decoder, struct input_stream *is,
void
dsdlib_tag_id3(struct input_stream *is,
const struct tag_handler *handler,
- void *handler_ctx, goffset tagoffset)
+ void *handler_ctx, int64_t tagoffset)
{
assert(tagoffset >= 0);
@@ -140,8 +140,8 @@ dsdlib_tag_id3(struct input_stream *is,
id3_length_t count;
/* Prevent broken files causing problems */
- const goffset size = is->GetSize();
- const goffset offset = is->GetOffset();
+ const auto size = is->GetSize();
+ const auto offset = is->GetOffset();
if (offset >= size)
return;