From: Tsuda Kageyu Date: Sun, 24 May 2015 15:43:36 +0000 (+0900) Subject: Stop calculating the offset in RIFF::File::chunkData(). X-Git-Tag: v1.10beta~35^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2337fbcfc612dcc550caac9fc284a68bc619fb88;p=taglib Stop calculating the offset in RIFF::File::chunkData(). --- 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); }