Scenario 1:
- Fire up AVAssetWriter with Audio / Video writer input.
- Use RPScreenRecorder to start recording with no microphone and process the sample buffers.
- File writes out fine to Photos on first try.
Scenario 2:
- Fire up AVAssetWriter with Audio / Video writer input.
- Use RPScreenRecorder to start recording with microphone enabled and process the sample buffers.
File writes fails to write out on the first try.
UserInfo={NSLocalizedRecoverySuggestion=Try saving again., NSLocalizedDescription=Cannot Save, NSUnderlyingError=0x1c464f3c0 {Error Domain=NSOSStatusErrorDomain Code=-12412 "(null)"}} 2017-10-26 23:25:16.896673-0400 [2135:771655] Status FAILS!: 3 Error Domain=AVFoundationErrorDomain Code=-11823 "Cannot Save"
2nd try works fine.
What am I doing wrong?
Added retry logic to circumvent the issue. Not the greatest solution but it works.