Avoid critsect for protection- and qm setting callbacks in VideoSender.
This CL avoids changing the mentioned callbacks during a call, to avoid a potential deadlock when acquiring _sendCritSect and calling _mediaOpt.SetTargetRates. Moving the critsect revealed a race for the FEC parameters in RtpVideoSender, so the CL grew a bit to avoid this. I also cleaned up some code here at the same time, but tried to keep it at a minimum since this CL had already increased a lot in size. BUG=769 R=pbos@webrtc.org, stefan@webrtc.org Review URL: https://webrtc-codereview.appspot.com/42939004 Cr-Commit-Position: refs/heads/master@{#8899}
This commit is contained in:
@ -246,7 +246,7 @@ uint32_t MediaOptimization::SetTargetRates(
|
||||
|
||||
// Update protection settings, when applicable.
|
||||
float sent_video_rate_kbps = 0.0f;
|
||||
if (selected_method) {
|
||||
if (loss_prot_logic_->SelectedType() != kNone) {
|
||||
// Update protection method with content metrics.
|
||||
selected_method->UpdateContentMetrics(content_->ShortTermAvgData());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user