Fix the number of frames used when interleaving in AudioBuffer::InterleaveTo()
R=henrik.lundin@webrtc.org, peah@webrtc.org
TBR=tina.legrand@webrtc.org
Review URL: https://codereview.webrtc.org/1862553002 .
Cr-Commit-Position: refs/heads/master@{#12249}
diff --git a/webrtc/modules/audio_processing/audio_buffer.cc b/webrtc/modules/audio_processing/audio_buffer.cc
index f300bb8..f9b9f63 100644
--- a/webrtc/modules/audio_processing/audio_buffer.cc
+++ b/webrtc/modules/audio_processing/audio_buffer.cc
@@ -430,10 +430,10 @@
}
if (frame->num_channels_ == num_channels_) {
- Interleave(data_ptr->ibuf()->channels(), proc_num_frames_, num_channels_,
+ Interleave(data_ptr->ibuf()->channels(), output_num_frames_, num_channels_,
frame->data_);
} else {
- UpmixMonoToInterleaved(data_ptr->ibuf()->channels()[0], proc_num_frames_,
+ UpmixMonoToInterleaved(data_ptr->ibuf()->channels()[0], output_num_frames_,
frame->num_channels_, frame->data_);
}
}