I use AVAssetWriter and AVAssetWriterInput to capture the input (CMSampleBuffer) to a target local file. It seems that it always writes to a temporary file first and write to the actual target file after finishWriting() is called. Is there a way to write to target file directly instead of to a temporary file. It is not using multi-pass now.
Now, it causes a problem if the app crashes, and the recorded media can't be recovered. We like to at least recover the media.
Thanks