diff --git a/MP42/MP42AVFImporter.m b/MP42/MP42AVFImporter.m index 296b4dd..ab3345f 100644 --- a/MP42/MP42AVFImporter.m +++ b/MP42/MP42AVFImporter.m @@ -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]; diff --git a/MP42/MP42Track.m b/MP42/MP42Track.m index 6ea3831..80d33a2 100644 --- a/MP42/MP42Track.m +++ b/MP42/MP42Track.m @@ -128,6 +128,7 @@ if (tag) { [mediaCharacteristicTags addObject:tag]; } + free(ppValue); } count++;