Julian Steenbakker
Committed by GitHub

Merge pull request #640 from FlockiiX/ios-buffer-fix

fix: Fixes issue #634
@@ -227,6 +227,8 @@ public class MobileScanner: NSObject, AVCaptureVideoDataOutputSampleBufferDelega @@ -227,6 +227,8 @@ public class MobileScanner: NSObject, AVCaptureVideoDataOutputSampleBufferDelega
227 for output in captureSession.outputs { 227 for output in captureSession.outputs {
228 captureSession.removeOutput(output) 228 captureSession.removeOutput(output)
229 } 229 }
  230 +
  231 + latestBuffer = nil
230 device.removeObserver(self, forKeyPath: #keyPath(AVCaptureDevice.torchMode)) 232 device.removeObserver(self, forKeyPath: #keyPath(AVCaptureDevice.torchMode))
231 device.removeObserver(self, forKeyPath: #keyPath(AVCaptureDevice.videoZoomFactor)) 233 device.removeObserver(self, forKeyPath: #keyPath(AVCaptureDevice.videoZoomFactor))
232 registry?.unregisterTexture(textureId) 234 registry?.unregisterTexture(textureId)