Bug 1266792 - Don't play opus with AndroidDecoderModule. r=jya

The android 5.1.1 OMX decoder claims to support audio/opus
but crashes on the output of our mp4 demuxer. Work around
this by rejecting the mime type, allowing fallback to the
libopus-based AgnosticDecoderModule.

In any case, since we're shipping the libopus-based decoder
we're prefer to use it for consistency.

MozReview-Commit-ID: GQaTMALajnZ

--HG--
extra : rebase_source : fb43ddc6bd7b5ed92308124045ad2330a8043f46
This commit is contained in:
Ralph Giles 2016-10-31 16:39:03 -07:00
parent 92e243086a
commit 2de2f42926

View File

@ -151,6 +151,13 @@ AndroidDecoderModule::SupportsMimeType(const nsACString& aMimeType,
return false;
}
// Prefer the gecko decoder for opus; stagefright crashes
// on content demuxed from mp4.
if (aMimeType.EqualsLiteral("audio/opus")) {
LOG("Rejecting audio of type %s", aMimeType.Data());
return false;
}
return java::HardwareCodecCapabilityUtils::FindDecoderCodecInfoForMimeType(
nsCString(TranslateMimeType(aMimeType)));
}