Adding critsect for child_modules_ in ModuleRtpRtcpImpl::Process() to avoid race with ModuleRtpRtcp::RegisterChildModule.
Found with tsan. TEST=try job and tsan R=holmer@google.com Review URL: https://webrtc-codereview.appspot.com/2156004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@4661 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
cb5118c14c
commit
cac7325b84
@ -196,7 +196,12 @@ int32_t ModuleRtpRtcpImpl::Process() {
|
|||||||
last_bitrate_process_time_ = now;
|
last_bitrate_process_time_ = now;
|
||||||
}
|
}
|
||||||
|
|
||||||
const bool default_instance(child_modules_.empty() ? false : true);
|
bool default_instance = false;
|
||||||
|
{
|
||||||
|
CriticalSectionScoped cs(critical_section_module_ptrs_.get());
|
||||||
|
if (!child_modules_.empty())
|
||||||
|
default_instance = true;
|
||||||
|
}
|
||||||
if (!default_instance) {
|
if (!default_instance) {
|
||||||
if (rtcp_sender_.Sending()) {
|
if (rtcp_sender_.Sending()) {
|
||||||
// Process RTT if we have received a receiver report and we haven't
|
// Process RTT if we have received a receiver report and we haven't
|
||||||
|
Loading…
x
Reference in New Issue
Block a user