Non-zero pacing debt should result in non-zero process time delta.
Bug: webrtc:11340 Change-Id: Ib5567ef03d324b44fd1c0f3f8265870acb710cc9 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259764 Reviewed-by: Emil Lundmark <lndmrk@webrtc.org> Commit-Queue: Erik Språng <sprang@webrtc.org> Cr-Commit-Position: refs/heads/main@{#36616}
This commit is contained in:
committed by
WebRTC LUCI CQ
parent
1729642b72
commit
b844dd8465
@ -366,6 +366,13 @@ Timestamp PacingController::NextSendTime() const {
|
||||
RTC_DCHECK_GT(media_rate_, DataRate::Zero());
|
||||
TimeDelta drain_time =
|
||||
std::max(media_debt_ / media_rate_, padding_debt_ / padding_rate_);
|
||||
|
||||
if (drain_time.IsZero() &&
|
||||
(!media_debt_.IsZero() || !padding_debt_.IsZero())) {
|
||||
// We have a non-zero debt, but drain time is smaller than tick size of
|
||||
// TimeDelta, round it up to the smallest possible non-zero delta.
|
||||
drain_time = TimeDelta::Micros(1);
|
||||
}
|
||||
next_send_time = last_process_time_ + drain_time;
|
||||
} else {
|
||||
// Nothing to do.
|
||||
|
||||
Reference in New Issue
Block a user