mirror of
https://github.com/taglib/taglib.git
synced 2026-01-30 12:05:40 -05:00
MP4: Support 64-bit atoms on Windows
The check for the size of long is no longer needed because since TagLib 2.0 the related fields are 64-bit on Windows too. Related to https://bugs.kde.org/show_bug.cgi?id=513531
This commit is contained in:
@ -74,17 +74,7 @@ MP4::Atom::Atom(File *file)
|
||||
}
|
||||
else if(d->length == 1) {
|
||||
// The atom has a 64-bit length.
|
||||
if(const long long longLength = file->readBlock(8).toLongLong();
|
||||
longLength <= LONG_MAX) {
|
||||
// The actual length fits in long. That's always the case if long is 64-bit.
|
||||
d->length = static_cast<long>(longLength);
|
||||
}
|
||||
else {
|
||||
debug("MP4: 64-bit atoms are not supported");
|
||||
d->length = 0;
|
||||
file->seek(0, File::End);
|
||||
return;
|
||||
}
|
||||
d->length = file->readBlock(8).toLongLong();
|
||||
}
|
||||
|
||||
if(d->length < 8 || d->length > file->length() - d->offset) {
|
||||
|
||||
Reference in New Issue
Block a user