Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(709)

Unified Diff: webrtc/call/call.cc

Issue 2274713002: Do not update stats for WebRTC.Call.EstimatedSendBitrateInKbps if we are not sending video (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/call/call.cc
diff --git a/webrtc/call/call.cc b/webrtc/call/call.cc
index f6354ade28e89e17037e9b03a3750058efc4b3fc..ceec963ee29a04b2f2f9f8f11dfa446d0861db86 100644
--- a/webrtc/call/call.cc
+++ b/webrtc/call/call.cc
@@ -735,6 +735,12 @@ void Call::OnNetworkChanged(uint32_t target_bitrate_bps, uint8_t fraction_loss,
// Ignore updates where the bitrate is zero because the aggregate network
// state is down.
if (target_bitrate_bps > 0) {
+ {
+ ReadLockScoped read_lock(*send_crit_);
+ // Do not update the stats if we are not sending video.
+ if (video_send_streams_.empty())
+ return;
+ }
rtc::CritScope lock(&bitrate_crit_);
// We only update these stats if we have send streams, and assume that
// OnNetworkChanged is called roughly with a fixed frequency.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698