ios - AVAssetWriterInput appendSampleBuffer crashing -


i have audiowriterbuffer appending audio sample buffers follows

func captureoutput(captureoutput: avcaptureoutput!, didoutputsamplebuffer samplebuffer: cmsamplebuffer!, fromconnection connection: avcaptureconnection!) {      if cmsamplebufferdataisready(samplebuffer) <= 0 {         return     }      if captureoutput == audiooutput && audiowriterbuffer != nil && audiowriterbuffer.readyformoremediadata == true {         var audiotime = cmsamplebuffergetpresentationtimestamp(samplebuffer)         audiowriterbuffer.appendsamplebuffer(samplebuffer)     } } 

it works supposed to. every once in while, crashes following error:

nsarray mutated while being enumerated.

at:

audiowriterbuffer.appendsamplebuffer(samplebuffer) 

i don't understand relevance of that, or how solve it.

any clue?


Comments

Popular posts from this blog

apache - setting document root in antoher partition on ubuntu -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -

Process 'command 'F:\android-sdk\build-tools\21.1.2\aapt.exe'' finished with non-zero exit value 1 -