Fix a bug in updating MP4 tags

This commit is contained in:
Tsuda Kageyu 2012-10-10 21:17:05 +09:00
parent 7e255733e0
commit a9df3e48f7

View 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();