]> granicus.if.org Git - taglib/commitdiff
Fix a bug in updating MP4 tags
authorTsuda Kageyu <tsuda.kageyu@gmail.com>
Wed, 10 Oct 2012 12:17:05 +0000 (21:17 +0900)
committerTsuda Kageyu <tsuda.kageyu@gmail.com>
Wed, 10 Oct 2012 12:17:05 +0000 (21:17 +0900)
taglib/mp4/mp4tag.cpp

index fc75fb456a14294003962ef6927029198ea3804d..f929ef64049f8b9181a0510be2b29630d0765548 100644 (file)
@@ -570,7 +570,7 @@ MP4::Tag::updateOffsets(long delta, long offset)
         atom->offset += delta;
       }
       d->file->seek(atom->offset + 9);
-      ByteVector data = d->file->readBlock(atom->offset - 9);
+      ByteVector data = d->file->readBlock(atom->length - 9);
       unsigned int flags = (ByteVector(1, '\0') + data.mid(0, 3)).toUInt();
       if(flags & 1) {
         long long o = data.mid(7, 8).toLongLong();