Bug 930372 - Use WMF instead of DirectShow for MP3 decoding on Vista and later, to avoid regressing duration calculation. r=padenot

This commit is contained in:
Chris Pearce 2013-10-25 09:43:17 +13:00
parent 6300642079
commit 251a222163

View File

@ -8,6 +8,9 @@
#include "DirectShowReader.h"
#include "MediaDecoderStateMachine.h"
#include "mozilla/Preferences.h"
#include "WinUtils.h"
using namespace mozilla::widget;
namespace mozilla {
@ -44,7 +47,8 @@ DirectShowDecoder::GetSupportedCodecs(const nsACString& aType,
bool
DirectShowDecoder::IsEnabled()
{
return Preferences::GetBool("media.directshow.enabled");
return (WinUtils::GetWindowsVersion() < WinUtils::VISTA_VERSION) &&
Preferences::GetBool("media.directshow.enabled");
}
DirectShowDecoder::DirectShowDecoder()