From 07b93dcf8084bcae92fa1f33652723ca9c990db2 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 22 May 2014 10:10:16 +0200 Subject: InputStream: make Seek() always absolute Remove the "whence" parameter that is not actually necessary, and only complicates the InputStream implementations. --- src/decoder/plugins/DsdLib.cxx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/decoder/plugins/DsdLib.cxx') diff --git a/src/decoder/plugins/DsdLib.cxx b/src/decoder/plugins/DsdLib.cxx index f77d8f59a..2bd532a05 100644 --- a/src/decoder/plugins/DsdLib.cxx +++ b/src/decoder/plugins/DsdLib.cxx @@ -30,9 +30,7 @@ #include "tag/TagId3.hxx" #include "util/Error.hxx" -#include #include -#include /* for SEEK_SET, SEEK_CUR */ #ifdef HAVE_ID3TAG #include @@ -63,7 +61,7 @@ dsdlib_skip_to(Decoder *decoder, InputStream &is, int64_t offset) { if (is.IsSeekable()) - return is.Seek(offset, SEEK_SET, IgnoreError()); + return is.Seek(offset, IgnoreError()); if (is.GetOffset() > offset) return false; @@ -96,7 +94,7 @@ dsdlib_skip(Decoder *decoder, InputStream &is, return true; if (is.IsSeekable()) - return is.Seek(delta, SEEK_CUR, IgnoreError()); + return is.Seek(is.GetOffset() + delta, IgnoreError()); char buffer[8192]; while (delta > 0) { -- cgit v1.2.3