Fix a clang static analyzer warning

This commit is contained in:
Damiano Galassi committed 2025-03-10 10:18:40 +01:00
1 parent 531b5555b9
commit 52b383e01b
1 file changed
+11 -7
+11 -7
View File
@@ -811,15 +811,19 @@ static bool GetFirstHeader(FILE* inFile)
samplesPerSecond,
channelConfig);
newTrack.timescale = samplesPerSecond;
newTrack.channels = channelConfig;
newTrack.dataLength = [[[NSFileManager.defaultManager attributesOfItemAtPath:self.fileURL.path error:nil] valueForKey:NSFileSize] unsignedLongLongValue];
if (pConfig) {
newTrack.timescale = samplesPerSecond;
newTrack.channels = channelConfig;
newTrack.dataLength = [[[NSFileManager.defaultManager attributesOfItemAtPath:self.fileURL.path error:nil] valueForKey:NSFileSize] unsignedLongLongValue];
aacInfo = [[NSMutableData alloc] init];
[aacInfo appendBytes:pConfig length:configLength];
free(pConfig);
aacInfo = [[NSMutableData alloc] init];
[aacInfo appendBytes:pConfig length:configLength];
free(pConfig);
[self addTrack:newTrack];
[self addTrack:newTrack];
} else {
return nil;
}
}
return self;