Ensure returned delay based estimate from probe can be clamped by

AimdRateControl

AimdRateControl can potentially clamp bitrate in SetEstimate.
DelayBasedBwe::MaybeUpdateEstimate should therefore check the result before using the probe bitrate.
Otherwise, BWE may drop on next update.

Bug: none
Change-Id: I8b1b3549a2bcd981e941b1cc802c984828d68261
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/252444
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36099}
This commit is contained in:
Per Kjellander
2022-02-24 17:32:12 +01:00
committed by WebRTC LUCI CQ
parent 7601fd7677
commit c6d3a7a691

View File

@ -243,8 +243,8 @@ DelayBasedBwe::Result DelayBasedBwe::MaybeUpdateEstimate(
if (probe_bitrate) {
result.probe = true;
result.updated = true;
result.target_bitrate = *probe_bitrate;
rate_control_.SetEstimate(*probe_bitrate, at_time);
result.target_bitrate = rate_control_.LatestEstimate();
} else {
result.updated =
UpdateEstimate(at_time, acked_bitrate, &result.target_bitrate);