Fix some memory leaks.
This commit is contained in:
2 files changed
+7
-3
No files matched your search
@@ -976,10 +976,10 @@
|
|||||||
CFArrayRef attachmentsArray = CMSampleBufferGetSampleAttachmentsArray(sampleBuffer, NO);
|
CFArrayRef attachmentsArray = CMSampleBufferGetSampleAttachmentsArray(sampleBuffer, NO);
|
||||||
if (attachmentsArray) {
|
if (attachmentsArray) {
|
||||||
for (NSDictionary *dict in (NSArray *)attachmentsArray) {
|
for (NSDictionary *dict in (NSArray *)attachmentsArray) {
|
||||||
if ([dict valueForKey:(NSString *)kCMSampleAttachmentKey_NotSync]) {
|
if (dict[(NSString *)kCMSampleAttachmentKey_NotSync]) {
|
||||||
sync = 0;
|
sync = 0;
|
||||||
}
|
}
|
||||||
if ([dict valueForKey:(NSString *)kCMSampleAttachmentKey_DoNotDisplay]) {
|
if (dict[(NSString *)kCMSampleAttachmentKey_DoNotDisplay]) {
|
||||||
doNotDisplay = YES;
|
doNotDisplay = YES;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1149,6 +1149,9 @@
|
|||||||
|
|
||||||
demuxHelper->currentTime = currentOutputTimeStamp.value;
|
demuxHelper->currentTime = currentOutputTimeStamp.value;
|
||||||
|
|
||||||
|
if (attachments) {
|
||||||
|
CFRelease(attachments);
|
||||||
|
}
|
||||||
free(timingArrayOut);
|
free(timingArrayOut);
|
||||||
free(sizeArrayOut);
|
free(sizeArrayOut);
|
||||||
}
|
}
|
||||||
@@ -1182,7 +1185,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
self.progress = (((CGFloat) currentDataLength / totalDataLength ) * 100);
|
self.progress = (((CGFloat) currentDataLength / totalDataLength ) * 100);
|
||||||
currentTime += 2;
|
currentTime += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
[assetReader release];
|
[assetReader release];
|
||||||
|
|||||||
@@ -128,6 +128,7 @@
|
|||||||
if (tag) {
|
if (tag) {
|
||||||
[mediaCharacteristicTags addObject:tag];
|
[mediaCharacteristicTags addObject:tag];
|
||||||
}
|
}
|
||||||
|
free(ppValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
count++;
|
count++;
|
||||||
|
|||||||
Reference in new issue
Block a user