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

(cherry picked from commit d66b09b)
  • Loading branch information
borongc authored and anonymous1-me committed Mar 22, 2024
1 parent 45d08c6 commit 225a65e
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,13 @@ void AdaptiveAudioDecoder::Reset() {
SB_DCHECK(BelongsToCurrentThread());

if (audio_decoder_) {
<<<<<<< HEAD
TeardownAudioDecoder();
=======
audio_decoder_->Reset();
resampler_.reset();
channel_mixer_.reset();
>>>>>>> d66b09b0522 ([media] Reset audio decoder via AudioDecoder::Reset() (#2672))
}
CancelPendingJobs();
while (!decoded_audios_.empty()) {
Expand Down

0 comments on commit 225a65e

Please sign in to comment.