Bug 861090 - Add pref to disable playback of MPEG files in nsVideoDocument using WMF. r=?padenot

This commit is contained in:
Chris Pearce 2013-06-21 11:16:55 +12:00
parent 700816d4d6
commit 8317275af6
2 changed files with 4 additions and 2 deletions

View File

@ -7,6 +7,7 @@
#include "DecoderTraits.h"
#include "MediaDecoder.h"
#include "nsCharSeparatedTokenizer.h"
#include "mozilla/Preferences.h"
#ifdef MOZ_MEDIA_PLUGINS
#include "MediaPluginHost.h"
@ -29,7 +30,6 @@
#include "RawReader.h"
#endif
#ifdef MOZ_GSTREAMER
#include "mozilla/Preferences.h"
#include "GStreamerDecoder.h"
#include "GStreamerReader.h"
#endif
@ -533,7 +533,8 @@ bool DecoderTraits::IsSupportedInVideoDocument(const nsACString& aType)
(MediaDecoder::IsMediaPluginsEnabled() && IsMediaPluginsType(aType)) ||
#endif
#ifdef MOZ_WMF
IsWMFSupportedType(aType) ||
(IsWMFSupportedType(aType) &&
Preferences::GetBool("media.windows-media-foundation.play-stand-alone", true)) ||
#endif
false;
}

View File

@ -167,6 +167,7 @@ pref("media.wakelock_timeout", 2000);
#ifdef MOZ_WMF
pref("media.windows-media-foundation.enabled", true);
pref("media.windows-media-foundation.use-dxva", true);
pref("media.windows-media-foundation.play-stand-alone", true);
#endif
#ifdef MOZ_RAW
pref("media.raw.enabled", true);