diff --git a/dom/media/platforms/android/AndroidDecoderModule.cpp b/dom/media/platforms/android/AndroidDecoderModule.cpp index 08d86c1f77eb..01759ac303fd 100644 --- a/dom/media/platforms/android/AndroidDecoderModule.cpp +++ b/dom/media/platforms/android/AndroidDecoderModule.cpp @@ -208,7 +208,10 @@ already_AddRefed 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;