Skip to content

Commit

Permalink
Cherry pick PR #2875: [media] Fix failing to reset all status in Adap…
Browse files Browse the repository at this point in the history
…tiveAudioDecoder (#2926)

Refer to the original PR: #2875

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

Co-authored-by: Bo-Rong Chen <[email protected]>
  • Loading branch information
cobalt-github-releaser-bot and borongc authored Apr 13, 2024
1 parent f3169d3 commit 58d3b3d
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 58d3b3d

Please sign in to comment.