Committed by
GitHub
Merge pull request #640 from FlockiiX/ios-buffer-fix
fix: Fixes issue #634
Showing
1 changed file
with
2 additions
and
0 deletions
| @@ -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) |
-
Please register or login to post a comment