appendSampleBuffer with an audio AVAssetWriterInput "leaks" memory until endSessionAtSourceTime appendSampleBuffer with an audio AVAssetWriterInput "leaks" memory until endSessionAtSourceTime ios ios

appendSampleBuffer with an audio AVAssetWriterInput "leaks" memory until endSessionAtSourceTime


Since you have been waiting a month for an answer I'll give you a less than ideal but workable answer.

You could use the ExtendedAudioFile functions to write a separate file. Then you could just playback the video and audio together with an AVComposition. I think you might be able to use AVFoundation to composite the caf and video together without reencoding if you need them composited at the end of recording.

That will get you off and running, then you can solve the memory leak at your leisure.