First time asking a question here. I\'m hoping the post is clear and sample code is formatted correctly.
I\'m experimenting with AVFoundation and time lapse photography.
OK, I found the bug in my first post.
When using
myStatus = CMSampleBufferCreateCopyWithNewTiming(kCFAllocatorDefault,
sampleBuffer,
1,
&sampleTimingInfo,
&newSampleBuffer);
you need to balance that with a CFRelease(newSampleBuffer);
The same idea holds true when using a CVPixelBufferRef with a piexBufferPool of an AVAssetWriterInputPixelBufferAdaptor instance. You would use CVPixelBufferRelease(yourCVPixelBufferRef);
after calling the appendPixelBuffer: withPresentationTime:
method.
Hope this is helpful to someone else.