From 735f8233470080dc519f3c2f1bc126eea19183a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20de=20Vicente=20Pe=C3=B1a?= Date: Thu, 21 Feb 2019 16:26:44 +0100 Subject: [PATCH] CreateAudioProcessor: do not propagate an unset echo control factory to the AudioProcessing instance In this CL we avoid the propagation of the echo control factory to the AudioProcessing instance when this is not set. That propagation was unnecessarily overriding the echo control factory that might have been already set on that AudioProcessing instance. Change-Id: Ife8f479bc7a81c35ecf656e7d0ddfcc98981c74f Bug: webrtc:10344 Reviewed-on: https://webrtc-review.googlesource.com/c/123765 Commit-Queue: Jesus de Vicente Pena Reviewed-by: Gustaf Ullberg Cr-Commit-Position: refs/heads/master@{#26802} --- .../audio_processing/test/audio_processing_simulator.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/audio_processing/test/audio_processing_simulator.cc b/modules/audio_processing/test/audio_processing_simulator.cc index 331d7e508f..c2dad17460 100644 --- a/modules/audio_processing/test/audio_processing_simulator.cc +++ b/modules/audio_processing/test/audio_processing_simulator.cc @@ -437,9 +437,11 @@ void AudioProcessingSimulator::CreateAudioProcessor() { } RTC_CHECK(ap_builder_); - ap_.reset((*ap_builder_) - .SetEchoControlFactory(std::move(echo_control_factory)) - .Create(config)); + if (echo_control_factory) { + ap_builder_->SetEchoControlFactory(std::move(echo_control_factory)); + } + ap_.reset((*ap_builder_).Create(config)); + RTC_CHECK(ap_); ap_->ApplyConfig(apm_config);