Avoid calling OnRoundTripTimeUpdate with invalid RTTs.

Bug: none
Change-Id: Ic19b87ad7094465da6091d0e99b10a6d1b7d2e58
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128776
Commit-Queue: Christoffer Rodbro <crodbro@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27308}
This commit is contained in:
Christoffer Rodbro
2019-03-27 12:34:21 +01:00
committed by Commit Bot
parent 8f22a28e30
commit afa61c94e5
2 changed files with 2 additions and 1 deletions

View File

@ -400,7 +400,7 @@ void RtpTransportControllerSend::OnReceivedRtcpReceiverReport(
report.receive_time = Timestamp::ms(now_ms);
report.round_trip_time = TimeDelta::ms(rtt_ms);
report.smoothed = false;
if (controller_)
if (controller_ && !report.round_trip_time.IsZero())
PostUpdates(controller_->OnRoundTripTimeUpdate(report));
});
}

View File

@ -229,6 +229,7 @@ NetworkControlUpdate GoogCcNetworkController::OnRoundTripTimeUpdate(
RoundTripTimeUpdate msg) {
if (packet_feedback_only_ || msg.smoothed)
return NetworkControlUpdate();
RTC_DCHECK(!msg.round_trip_time.IsZero());
if (delay_based_bwe_)
delay_based_bwe_->OnRttUpdate(msg.round_trip_time);
bandwidth_estimation_->UpdateRtt(msg.round_trip_time, msg.receive_time);