Fixing TSan data race warning in video end-to-end tests.
Needed to use critical section in "SendRtp"/"SendRtcp", which is what the real implementation ultimately does. TBR=stefan@webrtc.org Review URL: https://codereview.webrtc.org/2271433002 . Cr-Commit-Position: refs/heads/master@{#13857}
This commit is contained in:
parent
23d947dc98
commit
14cf12b1ea
@ -98,16 +98,19 @@ class EndToEndTest : public test::CallTest {
|
||||
bool SendRtp(const uint8_t* packet,
|
||||
size_t length,
|
||||
const PacketOptions& options) override {
|
||||
rtc::CritScope lock(&crit_);
|
||||
need_rtp_ = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool SendRtcp(const uint8_t* packet, size_t length) override {
|
||||
rtc::CritScope lock(&crit_);
|
||||
need_rtcp_ = false;
|
||||
return true;
|
||||
}
|
||||
bool need_rtp_;
|
||||
bool need_rtcp_;
|
||||
rtc::CriticalSection crit_;
|
||||
};
|
||||
|
||||
void DecodesRetransmittedFrame(bool enable_rtx, bool enable_red);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user