Bug 1273310 - Simplify DecoderDoctor failure flags. r=gerald

This is a bit easier to read. Currently there's no difference
since Startup is only called once, but it's probably better
future-proofing too, since the diagnostics should care more
about the current state than whether there's every been a
failure. Likewise reset the flags if the decoder is turned
off by a preference change.

MozReview-Commit-ID: 4zD7rkD6A3J

--HG--
extra : rebase_source : 800112ddf5d7548274e8d9f0e50a88b28ae10637
This commit is contained in:
Ralph Giles 2016-05-16 15:53:17 -07:00
parent 31cde1eb2a
commit 86ac5f9689

View File

@ -255,9 +255,9 @@ PDMFactory::CreatePDMs()
#ifdef XP_WIN
if (MediaPrefs::PDMWMFEnabled()) {
m = new WMFDecoderModule();
if (!StartupPDM(m)) {
mWMFFailedToLoad = true;
}
mWMFFailedToLoad = !StartupPDM(m);
} else {
mWMFFailedToLoad = false;
}
#endif
#ifdef MOZ_FFVPX
@ -269,9 +269,9 @@ PDMFactory::CreatePDMs()
#ifdef MOZ_FFMPEG
if (MediaPrefs::PDMFFmpegEnabled()) {
m = FFmpegRuntimeLinker::CreateDecoderModule();
if (!StartupPDM(m)) {
mFFmpegFailedToLoad = true;
}
mFFmpegFailedToLoad = !StartupPDM(m);
} else {
mFFmpegFailedToLoad = false;
}
#endif
#ifdef MOZ_APPLEMEDIA
@ -296,9 +296,9 @@ PDMFactory::CreatePDMs()
if (MediaPrefs::PDMGMPEnabled()) {
m = new GMPDecoderModule();
if (!StartupPDM(m)) {
mGMPPDMFailedToStartup = true;
}
mGMPPDMFailedToStartup = !StartupPDM(m);
} else {
mGMPPDMFailedToStartup = false;
}
}