Chromium Code Reviews
Descriptionmedia: Fix MediaCodecAudioDecoder reinitialization
According to media::AudioDecoder documentation, a decoder can be
reinitialized with a different config after it's previously initialized.
In this case, the decoder should drop all internal buffers and reset to
a clean state.
Currently this is not supported by MediaCodecAudioDecoder and running
the newly added test would cause DCHECKs to fire.
This CL fixes MediaCodecAudioDecoder to support reinitialization, where
it will always call SetInitialConfiguration() and CreateMediaCodecLoop()
to initialize the decoder with the new config.
New unit tests are added to cover this case. As part of the process I
also made some cleanup changes in the unit test file.
NOTRY=true
NOPRESUBMIT=true
TBR=dalecurtis@chromium.org,timav@chromium.org
BUG=679095
TEST=New test added.
Review-Url: https://codereview.chromium.org/2642823004
Cr-Commit-Position: refs/heads/master@{#445280}
(cherry picked from commit 2c1f8ed028edcb44c954cb2a0625a8f278933481)
Review-Url: https://codereview.chromium.org/2669253003
Cr-Commit-Position: refs/branch-heads/2987@{#278}
Cr-Branched-From: ad51088c0e8776e8dcd963dbe752c4035ba6dab6-refs/heads/master@{#444943}
Committed: https://chromium.googlesource.com/chromium/src/+/2d0fbfd1f7c4fc522c344b839dd97a28ea596177
Patch Set 1 #
Messages
Total messages: 6 (4 generated)
|
||||||||||||||||||||||||||||