After the writer has finished, he is no longer used. You must create a new one. From the docs:
You can use only one instance of AVAssetWriter to write to a single file. If you want to write to files several times, you must use a new instance of AVAssetWriter each time.
I have an application in which I use two AVAssetWriters. I create two authors in which only one is active at a time. When some time delta is reached, I click on the active script on the GCD queue to complete and rest and set the active recording pointer to another author.
if(time > delta) dispatch( ^{ finish writer, create new one }) active_writer = next writer
This works well when using a capture queue. You can configure the switch to perform operations based on the recording status.
Steve mcfarlin
source share