neteq_rtpplay: Fix a bug in the matlab plotting function
This CL fixes a small bug, causing the matlab plot script to contain
empty vectors. Also, the script file name is fixed, to avoid two
periods (.) in the file name; matlab did not like that.
BUG=none
Review-Url: https://codereview.webrtc.org/3004813002
Cr-Original-Commit-Position: refs/heads/master@{#19586}
Cr-Mirrored-From: https://chromium.googlesource.com/external/webrtc
Cr-Mirrored-Commit: f09c904dd12aecfd7bd632ed53a10d02ccb7ef2b
diff --git a/modules/audio_coding/neteq/tools/neteq_rtpplay.cc b/modules/audio_coding/neteq/tools/neteq_rtpplay.cc
index 996d8d8..b70a7f6 100644
--- a/modules/audio_coding/neteq/tools/neteq_rtpplay.cc
+++ b/modules/audio_coding/neteq/tools/neteq_rtpplay.cc
@@ -389,7 +389,7 @@
stats_.push_back(stats);
}
if (other_callback_) {
- other_callback_->BeforeGetAudio(neteq);
+ other_callback_->AfterGetAudio(time_now_ms, audio_frame, muted, neteq);
}
}
@@ -635,9 +635,12 @@
int64_t test_duration_ms = test.Run();
if (FLAGS_matlabplot) {
- std::cout << "Creating Matlab plot script " << output_file_name + ".m"
+ auto matlab_script_name = output_file_name;
+ std::replace(matlab_script_name.begin(), matlab_script_name.end(), '.',
+ '_');
+ std::cout << "Creating Matlab plot script " << matlab_script_name + ".m"
<< std::endl;
- delay_analyzer->CreateMatlabScript(output_file_name + ".m");
+ delay_analyzer->CreateMatlabScript(matlab_script_name + ".m");
}
printf("Simulation statistics:\n");