mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-12 21:30:45 +01:00
Fix use of uninitialized value in NetEq test.
Bug: chromium:339308502 Change-Id: Iee2a6ca190fdd2dee498afa6e36fa0eb1f7dd9b9 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/350304 Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org> Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org> Cr-Commit-Position: refs/heads/main@{#42283}
This commit is contained in:
parent
36ecffa129
commit
28a4ec36a0
1 changed files with 3 additions and 7 deletions
|
@ -76,8 +76,6 @@ NetEqTest::NetEqTest(const NetEq::Config& config,
|
|||
callbacks_(callbacks),
|
||||
sample_rate_hz_(config.sample_rate_hz),
|
||||
text_log_(std::move(text_log)) {
|
||||
RTC_CHECK(!config.enable_muted_state)
|
||||
<< "The code does not handle enable_muted_state";
|
||||
RegisterDecoders(codecs);
|
||||
}
|
||||
|
||||
|
@ -177,11 +175,9 @@ NetEqTest::SimulationStepResult NetEqTest::RunToNextGetAudio() {
|
|||
callbacks_.get_audio_callback->BeforeGetAudio(neteq_.get());
|
||||
}
|
||||
AudioFrame out_frame;
|
||||
bool muted;
|
||||
int error = neteq_->GetAudio(&out_frame, &muted, nullptr,
|
||||
int error = neteq_->GetAudio(&out_frame, nullptr, nullptr,
|
||||
ActionToOperations(next_action_));
|
||||
next_action_ = absl::nullopt;
|
||||
RTC_CHECK(!muted) << "The code does not handle enable_muted_state";
|
||||
if (error != NetEq::kOK) {
|
||||
if (callbacks_.error_callback) {
|
||||
callbacks_.error_callback->OnGetAudioError();
|
||||
|
@ -190,8 +186,8 @@ NetEqTest::SimulationStepResult NetEqTest::RunToNextGetAudio() {
|
|||
sample_rate_hz_ = out_frame.sample_rate_hz_;
|
||||
}
|
||||
if (callbacks_.get_audio_callback) {
|
||||
callbacks_.get_audio_callback->AfterGetAudio(time_now_ms, out_frame,
|
||||
muted, neteq_.get());
|
||||
callbacks_.get_audio_callback->AfterGetAudio(
|
||||
time_now_ms, out_frame, out_frame.muted(), neteq_.get());
|
||||
}
|
||||
|
||||
if (output_) {
|
||||
|
|
Loading…
Reference in a new issue