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-Commit-Position: refs/heads/master@{#19586}
This commit is contained in:
henrik.lundin
2017-08-29 09:14:08 -07:00
committed by Commit Bot
parent 579de6faef
commit f09c904dd1

View File

@ -389,7 +389,7 @@ class StatsGetter : public NetEqGetAudioCallback {
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 @@ int RunTest(int argc, char* argv[]) {
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");