Get Crash about AVAssetReaderTrackOutput
2 kind of crash
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '*** -[AVAssetReaderTrackOutput copyNextSampleBuffer] cannot copy next sample buffer before adding this output to an instance of AVAssetReader (using -addOutput:) and calling -startReading on that asset reader'
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '*** -[AVAssetReader startReading] cannot be called again after reading has already started' terminating with uncaught exception of type NSException
Hi. I'm having the same issue. Have you found any solutions?
I believe it's an issue having to do with concurrency, and multiple calls to addAssetID sharing the same audioReader, videoReader, and assetWriter. I fixed this by moving those three variables into the top of addAssetID (and cleaning up all references to self. for each of them).