Bug 1218577: Use only Blank PDM if enabled. r=kamidphish

This commit is contained in:
Jean-Yves Avenard 2015-10-27 08:49:03 +11:00
parent fb85e03c36
commit 282655272a

View File

@ -241,6 +241,15 @@ PDMFactory::CreatePDMs()
{
RefPtr<PlatformDecoderModule> m;
if (sUseBlankDecoder) {
m = CreateBlankDecoderModule();
StartupPDM(m);
// The Blank PDM SupportsMimeType reports true for all codecs; the creation
// of its decoder is infallible. As such it will be used for all media, we
// can stop creating more PDM from this point.
return;
}
if (sGMPDecoderEnabled) {
m = new GMPDecoderModule();
StartupPDM(m);
@ -282,11 +291,6 @@ PDMFactory::CreatePDMs()
m = new AgnosticDecoderModule();
StartupPDM(m);
if (sUseBlankDecoder) {
m = CreateBlankDecoderModule();
StartupPDM(m);
}
}
bool