Bug 1435709 - Don't attempt to use stagefright to decode theora. r?padenot
MozReview-Commit-ID: 215BhSSWGBC
--- a/dom/media/platforms/android/AndroidDecoderModule.cpp
+++ b/dom/media/platforms/android/AndroidDecoderModule.cpp
@@ -99,16 +99,23 @@ AndroidDecoderModule::SupportsMimeType(
// Not all android devices support FLAC even when they say they do.
if (OpusDataDecoder::IsOpus(aMimeType) ||
VorbisDataDecoder::IsVorbis(aMimeType) ||
aMimeType.EqualsLiteral("audio/flac")) {
LOG("Rejecting audio of type %s", aMimeType.Data());
return false;
}
+ // Prefer the gecko decoder for Theora.
+ // Not all android devices support Theora even when they say they do.
+ if (TheoraDecoder::IsTheora(aMimeType)) {
+ LOG("Rejecting video of type %s", aMimeType.Data());
+ return false;
+ }
+
return java::HardwareCodecCapabilityUtils::FindDecoderCodecInfoForMimeType(
nsCString(TranslateMimeType(aMimeType)));
}
already_AddRefed<MediaDataDecoder>
AndroidDecoderModule::CreateVideoDecoder(const CreateDecoderParams& aParams)
{
// Temporary - forces use of VPXDecoder when alpha is present.