From a9df3e48f7b59bc27e115e5b0ad057a642b6fac3 Mon Sep 17 00:00:00 2001 From: Tsuda Kageyu Date: Wed, 10 Oct 2012 21:17:05 +0900 Subject: [PATCH] Fix a bug in updating MP4 tags --- taglib/mp4/mp4tag.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/taglib/mp4/mp4tag.cpp b/taglib/mp4/mp4tag.cpp index fc75fb45..f929ef64 100644 --- a/taglib/mp4/mp4tag.cpp +++ b/taglib/mp4/mp4tag.cpp @@ -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();