From af04bc849ac229113bc11a86ae87915207e1c590 Mon Sep 17 00:00:00 2001 From: Chris Pearce Date: Fri, 25 Sep 2015 18:38:22 +1200 Subject: [PATCH] Bug 1208349 - Ensure we query PDM whether it supports MP4 before assuming it supports MP4. r=jya --- dom/media/fmp4/MP4Decoder.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dom/media/fmp4/MP4Decoder.cpp b/dom/media/fmp4/MP4Decoder.cpp index c17c6d735a48..a9528e485b67 100644 --- a/dom/media/fmp4/MP4Decoder.cpp +++ b/dom/media/fmp4/MP4Decoder.cpp @@ -275,7 +275,7 @@ CreateTestH264Decoder(layers::LayersBackend aBackend, PlatformDecoderModule::Init(); nsRefPtr platform = PlatformDecoderModule::Create(); - if (!platform) { + if (!platform || !platform->SupportsMimeType(NS_LITERAL_CSTRING("video/mp4"))) { return nullptr; } @@ -331,7 +331,7 @@ CreateTestAACDecoder(AudioInfo& aConfig) PlatformDecoderModule::Init(); nsRefPtr platform = PlatformDecoderModule::Create(); - if (!platform) { + if (!platform || !platform->SupportsMimeType(NS_LITERAL_CSTRING("audio/mp4"))) { return nullptr; }