diff --git a/talk/media/webrtc/webrtcvideoengine2.cc b/talk/media/webrtc/webrtcvideoengine2.cc index 1d7c006c2..8b46f767a 100644 --- a/talk/media/webrtc/webrtcvideoengine2.cc +++ b/talk/media/webrtc/webrtcvideoengine2.cc @@ -1481,12 +1481,16 @@ void WebRtcVideoChannel2::WebRtcVideoSendStream::MuteStream(bool mute) { } bool WebRtcVideoChannel2::WebRtcVideoSendStream::DisconnectCapturer() { - rtc::CritScope cs(&lock_); - if (capturer_ == NULL) { - return false; + cricket::VideoCapturer* capturer; + { + rtc::CritScope cs(&lock_); + if (capturer_ == NULL) { + return false; + } + capturer = capturer_; + capturer_ = NULL; } - capturer_->SignalVideoFrame.disconnect(this); - capturer_ = NULL; + capturer->SignalVideoFrame.disconnect(this); return true; } diff --git a/webrtc/build/tsan_suppressions_webrtc.cc b/webrtc/build/tsan_suppressions_webrtc.cc index 0ae74f1ff..548045b67 100644 --- a/webrtc/build/tsan_suppressions_webrtc.cc +++ b/webrtc/build/tsan_suppressions_webrtc.cc @@ -59,8 +59,6 @@ char kTSanDefaultSuppressions[] = // Potential deadlocks detected after roll in r6516. // https://code.google.com/p/webrtc/issues/detail?id=3509 -"deadlock:cricket::WebRtcVideoChannel2::WebRtcVideoSendStream::InputFrame\n" -"deadlock:cricket::WebRtcVideoChannel2::WebRtcVideoSendStream::SetCapturer\n" "deadlock:webrtc::ProcessThreadImpl::RegisterModule\n" "deadlock:webrtc::RTCPReceiver::SetSsrcs\n" "deadlock:webrtc::RTPSenderAudio::RegisterAudioPayload\n"