From da4fcc494ce29b6b504d88d7d6d8c129462288c6 Mon Sep 17 00:00:00 2001 From: "tkchin@webrtc.org" Date: Tue, 17 Mar 2015 20:13:15 +0000 Subject: [PATCH] Add minor fixes to video_capture_ios.mm in order to make it more robust. R=tkchin@webrtc.org Review URL: https://webrtc-codereview.appspot.com/46429005 Patch from Iurii Shevchuk . Cr-Commit-Position: refs/heads/master@{#8763} git-svn-id: http://webrtc.googlecode.com/svn/trunk@8763 4adac7df-926f-26a2-2b94-8c16560cd09d --- webrtc/modules/video_capture/ios/video_capture_ios.mm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/webrtc/modules/video_capture/ios/video_capture_ios.mm b/webrtc/modules/video_capture/ios/video_capture_ios.mm index 2010f03080..e9c77631c0 100644 --- a/webrtc/modules/video_capture/ios/video_capture_ios.mm +++ b/webrtc/modules/video_capture/ios/video_capture_ios.mm @@ -31,11 +31,13 @@ VideoCaptureIos::VideoCaptureIos(const int32_t capture_id) capability_.width = kDefaultWidth; capability_.height = kDefaultHeight; capability_.maxFPS = kDefaultFrameRate; + capture_device_ = nil; } VideoCaptureIos::~VideoCaptureIos() { if (is_capturing_) { [capture_device_ stopCapture]; + capture_device_ = nil; } }