Skip to content

Commit

Permalink
[media] Fix failing to reset all status in AdaptiveAudioDecoder (#2875)
Browse files Browse the repository at this point in the history
1. This PR (#2287) returns an
empyt DecodedAudio if it is end of stream. However,
|first_input_written_| doesn't reset during
AdaptiveAudioDecoder::ResetInternal(), causing it failed on
AudioDecoderTest reset-related tests.
2. On ps5, |output_format_checked_| doesn't reset cause |resampler_| and
|channel_mixer_| are nullptr, causing AudioDecoderTests fails.

b/333416579
b/333412348
b/320568573

Test-On-Device: true
(cherry picked from commit 32a2037)
  • Loading branch information
borongc committed Apr 12, 2024
1 parent f3169d3 commit 86c708b
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,8 @@ void AdaptiveAudioDecoder::ResetInternal() {
flushing_ = false;
stream_ended_ = false;
first_output_received_ = false;
first_input_written_ = false;
output_format_checked_ = false;
}

void AdaptiveAudioDecoder::OnDecoderOutput() {
Expand Down

0 comments on commit 86c708b

Please sign in to comment.