Skip to content

Commit

Permalink
[media] Reset audio decoder via AudioDecoder::Reset() (#2672)
Browse files Browse the repository at this point in the history
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 authored Mar 22, 2024
1 parent 804e15e commit d66b09b
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 d66b09b

Please sign in to comment.