From b2745ba1f869fdb81f0d361d8125cb94696d93fd Mon Sep 17 00:00:00 2001 From: Johannes Kron Date: Fri, 13 Aug 2021 10:24:04 +0200 Subject: [PATCH] Condition frame pacing on min/max playout delay As a first step we only want to enable frame pacing for the case where min playout delay == 0 and max playout delay > 0. Bug: chromium:1237402, chromium:1239469 Change-Id: Icf9641db7566083d0279135efa8618e435d881eb Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/228640 Commit-Queue: Johannes Kron Reviewed-by: Ilya Nikolaevskiy Cr-Commit-Position: refs/heads/master@{#34752} --- modules/video_coding/timing.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/video_coding/timing.cc b/modules/video_coding/timing.cc index 20aa7e5e44..b4a712b8b8 100644 --- a/modules/video_coding/timing.cc +++ b/modules/video_coding/timing.cc @@ -213,7 +213,8 @@ int64_t VCMTiming::MaxWaitingTime(int64_t render_time_ms, bool too_many_frames_queued) const { MutexLock lock(&mutex_); - if (render_time_ms == 0 && zero_playout_delay_min_pacing_->us() > 0) { + if (render_time_ms == 0 && zero_playout_delay_min_pacing_->us() > 0 && + min_playout_delay_ms_ == 0 && max_playout_delay_ms_ > 0) { // `render_time_ms` == 0 indicates that the frame should be decoded and // rendered as soon as possible. However, the decoder can be choked if too // many frames are sent at once. Therefore, limit the interframe delay to