Chromium Code Reviews| 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. |