Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

LLSimpleCamera : AVAssetWriterInput appendSampleBuffer crashing

I am using LLSimpleCamera for recording a video. It's recording fine when I use rear camera but when I switch to front camera, app crashes and the error reported is

* Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '* -[AVAssetWriterInput appendSampleBuffer:] Media type of sample buffer must match receiver's media type ("soun")'

I have tried many of the stackOverflow posts but not able to fix crash. Can anyone let me know what can be the issue ?

like image 936
Preetika Avatar asked Jan 25 '19 04:01

Preetika


1 Answers

The answer to the question is :

Changing AVCaptureDeviceInput leads to AVAssetWriterStatusFailed

Thanks to Stackoverflow.

like image 176
Preetika Avatar answered Nov 16 '22 15:11

Preetika