From f09c904dd12aecfd7bd632ed53a10d02ccb7ef2b Mon Sep 17 00:00:00 2001 From: "henrik.lundin" Date: Tue, 29 Aug 2017 09:14:08 -0700 Subject: [PATCH] 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} --- webrtc/modules/audio_coding/neteq/tools/neteq_rtpplay.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/webrtc/modules/audio_coding/neteq/tools/neteq_rtpplay.cc b/webrtc/modules/audio_coding/neteq/tools/neteq_rtpplay.cc index 996d8d8e41..b70a7f6ea9 100644 --- a/webrtc/modules/audio_coding/neteq/tools/neteq_rtpplay.cc +++ b/webrtc/modules/audio_coding/neteq/tools/neteq_rtpplay.cc @@ -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");