Closed tettoffensive closed 7 years ago
My guess is this is a concurrency issue:
Since most places begin/commit we're on the capture session queue. but not in this block of code in - (void)_sessionStarted:(NSNotification *)notification
. Here's what I'm thinking to modify.
AVCaptureDevice *device = [_currentInput device];
if (device) {
[self _enqueueBlockOnCaptureSessionQueue:^{
[self willChangeValueForKey:@"currentDevice"];
[self _setCurrentDevice:device];
[self didChangeValueForKey:@"currentDevice"];
}];
}
Hey @tettoffensive thanks for the interest in the library and your comments. I haven't been able to work on contributions due to a contract I'm involved with at the moment. If you or others submit a pull request, I can get a collaborator to get it merged in.
Getting this crash from some of our users:
AVCaptureSession can't stopRunning between calls to beginConfiguration / commitConfiguration
This is also a hugely common crash for our app as recorded by crashlytics.