Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(719)

Unified Diff: media/video/capture/mac/video_capture_device_qtkit_mac.mm

Issue 120963003: When stopping QTKit video capture, call stopRunning before removeInput:. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/video/capture/mac/video_capture_device_qtkit_mac.mm
diff --git a/media/video/capture/mac/video_capture_device_qtkit_mac.mm b/media/video/capture/mac/video_capture_device_qtkit_mac.mm
index cd9c6d333e9dd36d9024d6e292ea0f7dc96c3781..79f8a100b95ba9a65d74bc5e4146f086f5fcedcc 100644
--- a/media/video/capture/mac/video_capture_device_qtkit_mac.mm
+++ b/media/video/capture/mac/video_capture_device_qtkit_mac.mm
@@ -219,8 +219,10 @@
- (void)stopCapture {
if ([[captureSession_ inputs] count] == 1) {
- [captureSession_ removeInput:captureDeviceInput_];
+ // |stopRunning| must be called before |removeInput:| to avoid a deadlock
+ // with device enumeration when the active camera is unplugged.
[captureSession_ stopRunning];
+ [captureSession_ removeInput:captureDeviceInput_];
}
[[NSNotificationCenter defaultCenter] removeObserver:self];
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698