Fix some memory leaks.

This commit is contained in:
Damiano Galassi committed 2017-09-29 13:03:22 +02:00
1 parent 2229eeac7d
commit 44a8f8d14e
2 files changed
+7 -3

No files matched your search

+6 -3
View File
@@ -976,10 +976,10 @@
CFArrayRef attachmentsArray = CMSampleBufferGetSampleAttachmentsArray(sampleBuffer, NO);
if (attachmentsArray) {
for (NSDictionary *dict in (NSArray *)attachmentsArray) {
if ([dict valueForKey:(NSString *)kCMSampleAttachmentKey_NotSync]) {
if (dict[(NSString *)kCMSampleAttachmentKey_NotSync]) {
sync = 0;
}
if ([dict valueForKey:(NSString *)kCMSampleAttachmentKey_DoNotDisplay]) {
if (dict[(NSString *)kCMSampleAttachmentKey_DoNotDisplay]) {
doNotDisplay = YES;
}
}
@@ -1149,6 +1149,9 @@
demuxHelper->currentTime = currentOutputTimeStamp.value;
if (attachments) {
CFRelease(attachments);
}
free(timingArrayOut);
free(sizeArrayOut);
}
@@ -1182,7 +1185,7 @@
}
self.progress = (((CGFloat) currentDataLength / totalDataLength ) * 100);
currentTime += 2;
currentTime += 1;
}
[assetReader release];
+1
View File
@@ -128,6 +128,7 @@
if (tag) {
[mediaCharacteristicTags addObject:tag];
}
free(ppValue);
}
count++;