aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/plugins/DsdLib.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-05-22 10:10:16 +0200
committerMax Kellermann <max@duempel.org>2014-05-22 13:52:00 +0200
commit07b93dcf8084bcae92fa1f33652723ca9c990db2 (patch)
tree5cfa3d13c14d68b70d54ade24169b84a7f614b8e /src/decoder/plugins/DsdLib.cxx
parent374c6a27db790eb637feaeb9bd27ed82897d7953 (diff)
downloadmpd-07b93dcf8084bcae92fa1f33652723ca9c990db2.tar.gz
mpd-07b93dcf8084bcae92fa1f33652723ca9c990db2.tar.xz
mpd-07b93dcf8084bcae92fa1f33652723ca9c990db2.zip
InputStream: make Seek() always absolute
Remove the "whence" parameter that is not actually necessary, and only complicates the InputStream implementations.
Diffstat (limited to 'src/decoder/plugins/DsdLib.cxx')
-rw-r--r--src/decoder/plugins/DsdLib.cxx6
1 files changed, 2 insertions, 4 deletions
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 <unistd.h>
#include <string.h>
-#include <stdio.h> /* for SEEK_SET, SEEK_CUR */
#ifdef HAVE_ID3TAG
#include <id3tag.h>
@@ -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) {