From 2337fbcfc612dcc550caac9fc284a68bc619fb88 Mon Sep 17 00:00:00 2001 From: Tsuda Kageyu Date: Mon, 25 May 2015 00:43:36 +0900 Subject: [PATCH] Stop calculating the offset in RIFF::File::chunkData(). --- taglib/riff/rifffile.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/taglib/riff/rifffile.cpp b/taglib/riff/rifffile.cpp index 979ec530..efd4f642 100644 --- a/taglib/riff/rifffile.cpp +++ b/taglib/riff/rifffile.cpp @@ -127,15 +127,7 @@ ByteVector RIFF::File::chunkData(uint i) if(i >= chunkCount()) return ByteVector::null; - // Offset for the first subchunk's data - - long begin = 12 + 8; - - for(uint it = 0; it < i; it++) - begin += 8 + d->chunks[it].size + d->chunks[it].padding; - - seek(begin); - + seek(d->chunks[i].offset); return readBlock(d->chunks[i].size); }