diff --git a/talk/app/webrtc/objc/avfoundationvideocapturer.mm b/talk/app/webrtc/objc/avfoundationvideocapturer.mm index bd472a498a..d68fdff79a 100644 --- a/talk/app/webrtc/objc/avfoundationvideocapturer.mm +++ b/talk/app/webrtc/objc/avfoundationvideocapturer.mm @@ -142,6 +142,7 @@ static dispatch_queue_t kBackgroundQueue = nil; if (!_isRunning) { return; } + [_videoOutput setSampleBufferDelegate:nil queue:nullptr]; AVCaptureSession* session = _captureSession; dispatch_async(kBackgroundQueue, ^{ [session stopRunning]; diff --git a/talk/examples/objc/AppRTCDemo/ios/ARDVideoCallViewController.m b/talk/examples/objc/AppRTCDemo/ios/ARDVideoCallViewController.m index b12a61a618..2f07c7a4cc 100644 --- a/talk/examples/objc/AppRTCDemo/ios/ARDVideoCallViewController.m +++ b/talk/examples/objc/AppRTCDemo/ios/ARDVideoCallViewController.m @@ -151,8 +151,10 @@ self.remoteVideoTrack = nil; self.localVideoTrack = nil; [_client disconnect]; - [self.presentingViewController dismissViewControllerAnimated:YES - completion:nil]; + if (![self isBeingDismissed]) { + [self.presentingViewController dismissViewControllerAnimated:YES + completion:nil]; + } } - (void)switchCamera {