Skip to content

Commit

Permalink
Cherry pick PR #2672: [media] Reset audio decoder via AudioDecoder::R…
Browse files Browse the repository at this point in the history
…eset() (#2685)

Refer to the original PR: #2672

1. When AdaptiveAudioDecoder() resets |audio_decoder_|, use audio_decoder_->Reset() to reset |audio_decoder_|.
2. The PR (#2501) does not clean up |resampler_| and |channel_mixer_|, which causes some tests failed on ps5. This PR cleans up |resampler_| and |channel_mixer_| in AdaptiveAudioDecoder::Reset() to fix the SbPlayerGetAudioConfigurationTest.MultipleSeeks test failures.

b/327229953
  • Loading branch information
borongc committed Mar 30, 2024
1 parent 7bffd2e commit 7246bcb
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ void AdaptiveAudioDecoder::Reset() {

if (audio_decoder_) {
audio_decoder_->Reset();
resampler_.reset();
channel_mixer_.reset();
}
CancelPendingJobs();
while (!decoded_audios_.empty()) {
Expand Down

0 comments on commit 7246bcb

Please sign in to comment.