Bug 1322070: P1. Don't attempt to decode some audio format. r?jolin
Rather than asserting that the bit depth is 16 bits, let it fallback to other PDMs
MozReview-Commit-ID: DnO3nvgEFAe
--- a/dom/media/platforms/android/AndroidDecoderModule.cpp
+++ b/dom/media/platforms/android/AndroidDecoderModule.cpp
@@ -203,17 +203,20 @@ AndroidDecoderModule::CreateVideoDecoder
aParams.mTaskQueue);
return decoder.forget();
}
already_AddRefed<MediaDataDecoder>
AndroidDecoderModule::CreateAudioDecoder(const CreateDecoderParams& aParams)
{
const AudioInfo& config = aParams.AudioConfig();
- MOZ_ASSERT(config.mBitDepth == 16, "We only handle 16-bit audio!");
+ if (config.mBitDepth != 16) {
+ // We only handle 16-bit audio.
+ return nullptr;
+ }
MediaFormat::LocalRef format;
LOG("CreateAudioFormat with mimeType=%s, mRate=%d, channels=%d",
config.mMimeType.Data(), config.mRate, config.mChannels);
NS_ENSURE_SUCCESS(MediaFormat::CreateAudioFormat(
config.mMimeType,