diff --git a/modules/audio_processing/aec3/render_delay_controller.cc b/modules/audio_processing/aec3/render_delay_controller.cc index 614f0ad65c..6120c3ecae 100644 --- a/modules/audio_processing/aec3/render_delay_controller.cc +++ b/modules/audio_processing/aec3/render_delay_controller.cc @@ -213,9 +213,7 @@ rtc::Optional RenderDelayControllerImpl::GetDelay( delay_samples_->quality == DelayEstimate::Quality::kRefined) { // Compute the skew offset and add a margin. offset_blocks = *skew_ - *skew; - if (abs(offset_blocks) <= 1) { - offset_blocks = 0; - } else if (soft_reset_counter_ > 10 * kNumBlocksPerSecond) { + if (offset_blocks != 0 && soft_reset_counter_ > 10 * kNumBlocksPerSecond) { // Soft reset the delay estimator if there is a significant offset // detected. delay_estimator_.Reset(true);