Reject multi-channel Opus config w/o description
Opus decoders configured with 2 or fewer channels do not need an
extradata field.
For more than 2 channels, we need to pass in extradata through
AudioDecoderConfig.description
when calling configure(). This is
necessary because we cannot guess whether the encoded Opus streams are
mono or stereo streams. For example, a 5.1 channel Opus file can be
encoded as 6 mono streams, or 3 stereo streams, or anywhere in between.
This CL updates WebCodecs code and WPTs to ensure that Opus configs
with more than 2 channels and no description are rejected when
isConfigSupported() is called, rather than causing an error during the
actual configure() call.
Bug: 360083330
Change-Id: I428623ee5497e78db32a46824769951d8d66b9a0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5819914
Auto-Submit: Thomas Guilbert tguilbert@chromium.org
Reviewed-by: Eugene Zemtsov eugene@chromium.org
Commit-Queue: Thomas Guilbert tguilbert@chromium.org
Cr-Commit-Position: refs/heads/main@{#1353634}