aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/plugins/DsdLib.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2015-01-30 22:55:50 +0100
committerMax Kellermann <max@duempel.org>2015-01-30 23:00:22 +0100
commitfd02c87fa2186c1151a2f5ff41115d83b5aedb63 (patch)
treebbaf691f1f343e040d48be8498bb5b7b26ae8e04 /src/decoder/plugins/DsdLib.cxx
parent63ac81c8f50a19982025786fa2ddcd37e249862d (diff)
downloadmpd-fd02c87fa2186c1151a2f5ff41115d83b5aedb63.tar.gz
mpd-fd02c87fa2186c1151a2f5ff41115d83b5aedb63.tar.xz
mpd-fd02c87fa2186c1151a2f5ff41115d83b5aedb63.zip
decoder/DsdLib: don't use InputStream::GetOffset() after seeking
We already know the offset.
Diffstat (limited to 'src/decoder/plugins/DsdLib.cxx')
-rw-r--r--src/decoder/plugins/DsdLib.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/decoder/plugins/DsdLib.cxx b/src/decoder/plugins/DsdLib.cxx
index 416439fef..664bf60ce 100644
--- a/src/decoder/plugins/DsdLib.cxx
+++ b/src/decoder/plugins/DsdLib.cxx
@@ -117,11 +117,10 @@ dsdlib_tag_id3(InputStream &is,
/* Prevent broken files causing problems */
const auto size = is.GetSize();
- const auto offset = is.GetOffset();
- if (offset >= size)
+ if (tagoffset >= size)
return;
- const id3_length_t count = size - offset;
+ const id3_length_t count = size - tagoffset;
if (count < 10 || count > 1024 * 1024)
return;