From 01c107e37a43f0dfe164bae274aac5844220240a Mon Sep 17 00:00:00 2001 From: Sam Zackrisson Date: Wed, 1 Apr 2020 18:01:51 +0200 Subject: [PATCH] Correct int16 audio frame setup in audioproc_f MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently, audioproc_f crashes on a DCHECK as the data vector of Int16Frame is not resized. Bug: webrtc:5298 Change-Id: I897cf0fce07e0ed2c0a365a965fa50fd3d8ddd18 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/172624 Reviewed-by: Per Ã…hgren Commit-Queue: Sam Zackrisson Cr-Commit-Position: refs/heads/master@{#30969} --- modules/audio_processing/test/audio_processing_simulator.h | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/audio_processing/test/audio_processing_simulator.h b/modules/audio_processing/test/audio_processing_simulator.h index 2727495a1f..fa6efc2842 100644 --- a/modules/audio_processing/test/audio_processing_simulator.h +++ b/modules/audio_processing/test/audio_processing_simulator.h @@ -40,6 +40,7 @@ struct Int16Frame { rtc::CheckedDivExact(sample_rate_hz, kChunksPerSecond); this->num_channels = num_channels; config = StreamConfig(sample_rate_hz, num_channels, /*has_keyboard=*/false); + data.resize(num_channels * samples_per_channel); } void CopyTo(ChannelBuffer* dest) {