Fix race in EndToEndTest.ReceivesFlexfecAndSendsCorrespondingRtcp.
R=stefan@webrtc.org
BUG=webrtc:7004
Review-Url: https://codereview.webrtc.org/2639173002
Cr-Commit-Position: refs/heads/master@{#16136}
diff --git a/webrtc/video/end_to_end_tests.cc b/webrtc/video/end_to_end_tests.cc
index 502851b..54b83e2 100644
--- a/webrtc/video/end_to_end_tests.cc
+++ b/webrtc/video/end_to_end_tests.cc
@@ -771,6 +771,7 @@
EXPECT_EQ(1U, report_blocks.size());
EXPECT_EQ(test::CallTest::kFlexfecSendSsrc,
report_blocks[0].source_ssrc());
+ rtc::CritScope lock(&crit_);
received_flexfec_rtcp_ = true;
}
}
@@ -813,8 +814,8 @@
// Since several packets can have the same timestamp a multiset is used
// instead of a set.
std::multiset<uint32_t> dropped_timestamps_ GUARDED_BY(crit_);
- bool expect_flexfec_rtcp_;
- bool received_flexfec_rtcp_;
+ const bool expect_flexfec_rtcp_;
+ bool received_flexfec_rtcp_ GUARDED_BY(crit_);
Random random_;
};