Remove CMake check for sizeof(long).

This commit is contained in:
Tsuda Kageyu
2014-12-09 08:55:46 +09:00
parent 0e6d8617ae
commit 0731bc7b2e
3 changed files with 8 additions and 15 deletions

View File

@ -56,20 +56,21 @@ MP4::Atom::Atom(File *file)
if(length == 1) {
const long long longLength = file->readBlock(8).toLongLong();
#ifdef LONG_IS_INT64
length = longLength;
#else
if(longLength <= 0xFFFFFFFF) {
// The atom has a 64-bit length, but it's actually a 32-bit value
length = (long)longLength;
if(sizeof(long) == sizeof(long long)) {
length = longLength;
}
else {
if(longLength <= 0xFFFFFFFF) {
// The atom has a 64-bit length, but it's actually a 32-bit value
length = (long)longLength;
}
else {
debug("MP4: 64-bit atoms are not supported");
length = 0;
file->seek(0, File::End);
return;
}
}
#endif
}
if(length < 8) {
debug("MP4: Invalid atom size");