From be514fa473ca9c8c4cfd3f3ee466a6a1dc994332 Mon Sep 17 00:00:00 2001 From: Andreas Pehrson Date: Fri, 10 Feb 2023 20:45:42 +0000 Subject: [PATCH] Bug 1811641 - [libwebrtc] Unset output delegate before stopping. r=webrtc-reviewers,dbaker This is similar to what the old backend does when stopping. Given that we do not fully understand the failure mode yet, this is a speculative fix. Differential Revision: https://phabricator.services.mozilla.com/D169448 --- .../sdk/objc/components/capturer/RTCCameraVideoCapturer.m | 1 + 1 file changed, 1 insertion(+) diff --git a/third_party/libwebrtc/sdk/objc/components/capturer/RTCCameraVideoCapturer.m b/third_party/libwebrtc/sdk/objc/components/capturer/RTCCameraVideoCapturer.m index ffa2daa9d8bf..4dc389e85ae0 100644 --- a/third_party/libwebrtc/sdk/objc/components/capturer/RTCCameraVideoCapturer.m +++ b/third_party/libwebrtc/sdk/objc/components/capturer/RTCCameraVideoCapturer.m @@ -205,6 +205,7 @@ const int64_t kNanosecondsPerSecond = 1000000000; for (AVCaptureDeviceInput *oldInput in [self.captureSession.inputs copy]) { [self.captureSession removeInput:oldInput]; } + [_videoDataOutput setSampleBufferDelegate:nil queue:nil]; [self.captureSession stopRunning]; #if TARGET_OS_IPHONE