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

Unified Diff: webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc

Issue 1669623004: Use CallStats for RTT in Call, rather than VideoSendStream::GetRtt() (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Check for CallStats RTT validity in rtp module Created 4 years, 10 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
Index: webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc b/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc
index 4c849f2f13dfe78131faec80db90bd4f584af70c..bda9a16aa0bd659c962b47afa228ff247727a695 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc
@@ -182,8 +182,12 @@ int32_t ModuleRtpRtcpImpl::Process() {
// Get processed rtt.
if (process_rtt) {
last_rtt_process_time_ = now;
- if (rtt_stats_)
- set_rtt_ms(rtt_stats_->LastProcessedRtt());
+ if (rtt_stats_) {
+ // Make sure we have a valid RTT before setting.
+ int64_t last_rtt = rtt_stats_->LastProcessedRtt();
+ if (last_rtt >= 0)
stefan-webrtc 2016/02/19 10:44:16 I have some memory of 0 not being a valid rtt, for
sprang 2016/02/19 15:03:16 Yes, but the behavior from outside won't change fr
+ set_rtt_ms(last_rtt);
+ }
}
// For sending streams, make sure to not send a SR before media has been sent.
« no previous file with comments | « webrtc/call/call.cc ('k') | webrtc/video/call_stats.h » ('j') | webrtc/video/call_stats.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698