Index: webrtc/modules/audio_processing/audio_buffer.cc |
diff --git a/webrtc/modules/audio_processing/audio_buffer.cc b/webrtc/modules/audio_processing/audio_buffer.cc |
index f9b9f631d2b813523ed4a9935ecbc3c0af2ab3bd..13ece67f254f9fcdc5115a58db28e9de411954f5 100644 |
--- a/webrtc/modules/audio_processing/audio_buffer.cc |
+++ b/webrtc/modules/audio_processing/audio_buffer.cc |
@@ -184,6 +184,10 @@ void AudioBuffer::InitForNewData() { |
reference_copied_ = false; |
activity_ = AudioFrame::kVadUnknown; |
num_channels_ = num_proc_channels_; |
+ data_->set_num_channels(num_proc_channels_); |
+ if (split_data_.get()) { |
+ split_data_->set_num_channels(num_proc_channels_); |
+ } |
} |
const int16_t* const* AudioBuffer::channels_const() const { |
@@ -345,6 +349,10 @@ size_t AudioBuffer::num_channels() const { |
void AudioBuffer::set_num_channels(size_t num_channels) { |
num_channels_ = num_channels; |
+ data_->set_num_channels(num_channels); |
+ if (split_data_.get()) { |
+ split_data_->set_num_channels(num_channels); |
+ } |
} |
size_t AudioBuffer::num_frames() const { |