Fixes a couple of issues on macOS 11 sdk.

This commit is contained in:
Damiano Galassi committed 2020-07-10 13:10:35 +02:00
1 parent 903d344b56
commit a51c3a28ce
12 files changed
+100 -78

No files matched your search

+7 -3
View File
@@ -59,22 +59,26 @@ extern NSString *libraryPath;
- (BOOL)_loadFileDump:(NSURL *)absoluteURL error:(NSError **)outError
{
MP4FileHandle fileHandle = MP4Read(absoluteURL.fileSystemRepresentation);
if (fileHandle == MP4_INVALID_FILE_HANDLE) {
return NO;
}
MP4LogLevel level = (MP4LogLevel)[NSUserDefaults.standardUserDefaults integerForKey:@"LogLevel"];
MP4LogSetLevel(level);
MP4Dump(fileHandle, 0);
MP4Close(fileHandle, 0);
result = [NSString stringWithContentsOfFile:libraryPath encoding:NSASCIIStringEncoding error:outError];
if ([NSFileManager.defaultManager isDeletableFileAtPath:libraryPath]) {
[NSFileManager.defaultManager removeItemAtPath:libraryPath error:nil];
}
if (result) {
return YES;
}
else {
} else {
return NO;
}
}