diff --git a/modules/video_coding/frame_buffer2.cc b/modules/video_coding/frame_buffer2.cc index e52af53353..2eb5866595 100644 --- a/modules/video_coding/frame_buffer2.cc +++ b/modules/video_coding/frame_buffer2.cc @@ -60,7 +60,9 @@ FrameBuffer::FrameBuffer(Clock* clock, stopped_(false), protection_mode_(kProtectionNack), stats_callback_(stats_callback), - last_log_non_decoded_ms_(-kLogNonDecodedIntervalMs) {} + last_log_non_decoded_ms_(-kLogNonDecodedIntervalMs), + add_rtt_to_playout_delay_( + webrtc::field_trial::IsEnabled("WebRTC-AddRttToPlayoutDelay")) {} FrameBuffer::~FrameBuffer() {} @@ -214,8 +216,7 @@ FrameBuffer::ReturnReason FrameBuffer::NextFrame( timing_->SetJitterDelay(jitter_estimator_->GetJitterEstimate(rtt_mult)); timing_->UpdateCurrentDelay(frame->RenderTime(), now_ms); } else { - if (RttMultExperiment::RttMultEnabled() || - webrtc::field_trial::IsEnabled("WebRTC-AddRttToPlayoutDelay")) + if (RttMultExperiment::RttMultEnabled() || add_rtt_to_playout_delay_) jitter_estimator_->FrameNacked(); } diff --git a/modules/video_coding/frame_buffer2.h b/modules/video_coding/frame_buffer2.h index 1f41bfa7e4..c71c19fcf1 100644 --- a/modules/video_coding/frame_buffer2.h +++ b/modules/video_coding/frame_buffer2.h @@ -173,6 +173,8 @@ class FrameBuffer { VCMReceiveStatisticsCallback* const stats_callback_; int64_t last_log_non_decoded_ms_ RTC_GUARDED_BY(crit_); + const bool add_rtt_to_playout_delay_; + RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(FrameBuffer); };