Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(559)

Unified Diff: webrtc/modules/audio_processing/test/aec_dump_based_simulator.cc

Issue 2573033003: Corrected access of null pointer in audioproc_f (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/audio_processing/test/aec_dump_based_simulator.cc
diff --git a/webrtc/modules/audio_processing/test/aec_dump_based_simulator.cc b/webrtc/modules/audio_processing/test/aec_dump_based_simulator.cc
index 10d4fcdf6f9ab4f44134728284a601d502b6202e..f444967a108955069df3002f0c934e108b83e09a 100644
--- a/webrtc/modules/audio_processing/test/aec_dump_based_simulator.cc
+++ b/webrtc/modules/audio_processing/test/aec_dump_based_simulator.cc
@@ -230,12 +230,11 @@ void AecDumpBasedSimulator::Process() {
<< "Only mono files for the artificial nearend are supported, "
"reverted to not using the artificial nearend file";
+ const int sample_rate_hz = artificial_nearend_file->sample_rate();
artificial_nearend_buffer_reader_.reset(
new ChannelBufferWavReader(std::move(artificial_nearend_file)));
artificial_nearend_buf_.reset(new ChannelBuffer<float>(
- rtc::CheckedDivExact(artificial_nearend_file->sample_rate(),
- kChunksPerSecond),
- 1));
+ rtc::CheckedDivExact(sample_rate_hz, kChunksPerSecond), 1));
ivoc 2016/12/14 10:26:41 Maybe I'm missing something, but to me it looks li
peah-webrtc 2016/12/14 10:33:40 I think what happens is that the pointer artificia
ivoc 2016/12/14 10:37:06 Ah right, that's a good point. It's easy to forget
}
webrtc::audioproc::Event event_msg;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698