Index: webrtc/video/video_quality_test.cc |
diff --git a/webrtc/video/video_quality_test.cc b/webrtc/video/video_quality_test.cc |
index 4357276146f86da57a7d9e3bf50a21e572b95358..37b47867d31db785967a08ef71384862c40651da 100644 |
--- a/webrtc/video/video_quality_test.cc |
+++ b/webrtc/video/video_quality_test.cc |
@@ -939,9 +939,11 @@ class VideoAnalyzer : public PacketReceiver, |
// Called when |send_stream_.SetSource()| is called. |
void AddOrUpdateSink(rtc::VideoSinkInterface<VideoFrame>* sink, |
const rtc::VideoSinkWants& wants) override { |
- rtc::CritScope lock(&crit_); |
- RTC_DCHECK(!send_stream_input_ || send_stream_input_ == sink); |
- send_stream_input_ = sink; |
+ { |
+ rtc::CritScope lock(&crit_); |
+ RTC_DCHECK(!send_stream_input_ || send_stream_input_ == sink); |
+ send_stream_input_ = sink; |
+ } |
if (video_capturer_) { |
video_capturer_->AddOrUpdateSink(this, wants); |
} |