RenderWriter checks number of bands before inserting AudioBuffer.

Temporary work-around for bug webrtc:8759.

Bug: webrtc:8759
Change-Id: Ia830c7e19d7bb332d760f52d62757a443761dc3e
Reviewed-on: https://webrtc-review.googlesource.com/39920
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21639}
This commit is contained in:
Gustaf Ullberg 2018-01-16 13:39:27 +01:00 committed by Commit Bot
parent ab20a6016c
commit 7d0427865c

View File

@ -184,6 +184,12 @@ EchoCanceller3::RenderWriter::~RenderWriter() = default;
void EchoCanceller3::RenderWriter::Insert(AudioBuffer* input) {
RTC_DCHECK_EQ(1, input->num_channels());
RTC_DCHECK_EQ(frame_length_, input->num_frames_per_band());
RTC_DCHECK_EQ(num_bands_, input->num_bands());
// TODO(bugs.webrtc.org/8759) Temporary work-around.
if (num_bands_ != static_cast<int>(input->num_bands()))
return;
data_dumper_->DumpWav("aec3_render_input", frame_length_,
&input->split_bands_f(0)[0][0],
LowestBandRate(sample_rate_hz_), 1);