Chromium Code Reviews| Index: webrtc/modules/audio_processing/aec/aec_core.cc |
| diff --git a/webrtc/modules/audio_processing/aec/aec_core.cc b/webrtc/modules/audio_processing/aec/aec_core.cc |
| index 3155bad9728dfbe9d051492ca183c8859b02cfa3..8586bb58d25212f0e9a523fc51fb5e818fe8a717 100644 |
| --- a/webrtc/modules/audio_processing/aec/aec_core.cc |
| +++ b/webrtc/modules/audio_processing/aec/aec_core.cc |
| @@ -202,19 +202,23 @@ void BlockBuffer::Insert(const float block[PART_LEN]) { |
| void BlockBuffer::ExtractExtendedBlock(float extended_block[PART_LEN2]) { |
| float* block_ptr = NULL; |
| + size_t read_elements; |
|
peah-webrtc
2017/07/07 14:28:56
I think you should move the declaration to line 21
saza WebRTC
2017/07/10 06:53:16
Done.
|
| RTC_DCHECK_LT(0, AvaliableSpace()); |
| // Extract the previous block. |
| WebRtc_MoveReadPtr(buffer_, -1); |
| - WebRtc_ReadBuffer(buffer_, reinterpret_cast<void**>(&block_ptr), |
| - &extended_block[0], 1); |
| + read_elements = WebRtc_ReadBuffer( |
| + buffer_, reinterpret_cast<void**>(&block_ptr), &extended_block[0], 1); |
| + RTC_CHECK_EQ(read_elements, 1); |
| if (block_ptr != &extended_block[0]) { |
| memcpy(&extended_block[0], block_ptr, PART_LEN * sizeof(float)); |
| } |
| // Extract the current block. |
| - WebRtc_ReadBuffer(buffer_, reinterpret_cast<void**>(&block_ptr), |
| - &extended_block[PART_LEN], 1); |
| + read_elements = |
| + WebRtc_ReadBuffer(buffer_, reinterpret_cast<void**>(&block_ptr), |
| + &extended_block[PART_LEN], 1); |
| + RTC_CHECK_EQ(read_elements, 1); |
| if (block_ptr != &extended_block[PART_LEN]) { |
| memcpy(&extended_block[PART_LEN], block_ptr, PART_LEN * sizeof(float)); |
| } |