LLSimpleCamera icon indicating copy to clipboard operation
LLSimpleCamera copied to clipboard

Bug in the zoom feature

Open gjgd opened this issue 9 years ago • 0 comments

Hey, I just pulled the latest commit on the zoom feature, and my app crashed. Apparently, effectiveScale took a value it should not have:

* Terminating app due to uncaught exception 'NSRangeException', reason: '* -[AVCaptureVideoDevice rampToVideoZoomFactor:rate:] - the passed videoZoomFactor 1.089863 out-of-range [1, activeFormat.videoMaxZoomFactor]'

That error is one that line/ [_videoCaptureDevice rampToVideoZoomFactor:_effectiveScale withRate:10]; at the end of file LLSimpleCamera.m

I tried to put
[_videoCaptureDevice rampToVideoZoomFactor:_effectiveScale < _videoCaptureDevice.activeFormat.videoMaxZoomFactor ? _effectiveScale : _videoCaptureDevice.activeFormat.videoMaxZoomFactor withRate:10]; instead, but still I cannot zoom in. Do I need to do anything else than pull the last commit, since _zoomEnabled is already set to YES ?

gjgd avatar Jul 24 '15 09:07 gjgd