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

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

Issue 1306863003: Fix accessing uninitialized variables when not processing a reverse stream. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: git cl format Created 5 years, 4 months 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/audioproc_float.cc
diff --git a/webrtc/modules/audio_processing/test/audioproc_float.cc b/webrtc/modules/audio_processing/test/audioproc_float.cc
index f22c41e2f84e79fc97a78a673d83e9af8987201e..268702e5dec6ac7ebfff26d9d9f466bff876b04a 100644
--- a/webrtc/modules/audio_processing/test/audioproc_float.cc
+++ b/webrtc/modules/audio_processing/test/audioproc_float.cc
@@ -168,12 +168,15 @@ int main(int argc, char* argv[]) {
const StreamConfig output_config = {
out_file.sample_rate(), out_buf.num_channels(),
};
- const StreamConfig reverse_input_config = {
- in_rev_file->sample_rate(), in_rev_file->num_channels(),
- };
- const StreamConfig reverse_output_config = {
- out_rev_file->sample_rate(), out_rev_file->num_channels(),
- };
+
+ StreamConfig reverse_input_config = {};
+ StreamConfig reverse_output_config = {};
+ if (process_reverse) {
+ StreamConfig reverse_input_config = {in_rev_file->sample_rate(),
Andrew MacDonald 2015/08/21 17:31:33 This redeclaration is a bug of course; fixed here:
+ in_rev_file->num_channels()};
+ StreamConfig reverse_output_config = {out_rev_file->sample_rate(),
+ out_rev_file->num_channels()};
+ }
while (in_file.ReadSamples(in_interleaved.size(),
&in_interleaved[0]) == in_interleaved.size()) {
// Have logs display the file time rather than wallclock time.
« 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