diff --git a/modules/audio_processing/aec3/aec_state.cc b/modules/audio_processing/aec3/aec_state.cc index 6a5b6e5266..53186259a0 100644 --- a/modules/audio_processing/aec3/aec_state.cc +++ b/modules/audio_processing/aec3/aec_state.cc @@ -117,10 +117,10 @@ void AecState::Update( filter_analyzer_.Update(adaptive_filter_impulse_response, render_buffer); // Estimate the direct path delay of the filter. - delay_state_.Update(filter_analyzer_, external_delay, - config_.filter.use_linear_filter - ? strong_not_saturated_render_blocks_ - : 0); + if (config_.filter.use_linear_filter) { + delay_state_.Update(filter_analyzer_, external_delay, + strong_not_saturated_render_blocks_); + } const std::vector& aligned_render_block = render_buffer.Block(-delay_state_.DirectPathFilterDelay())[0];