зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1668824 - On macOS and Windows, prefer ffmpeg to decode mp3s. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D92235
This commit is contained in:
Родитель
876505873f
Коммит
065d1d7e84
|
@ -14,6 +14,7 @@
|
|||
#include "VPXDecoder.h"
|
||||
#include "mozilla/DebugOnly.h"
|
||||
#include "mozilla/Logging.h"
|
||||
#include "mozilla/StaticPrefs_media.h"
|
||||
#include "mozilla/gfx/gfxVars.h"
|
||||
|
||||
extern "C" {
|
||||
|
@ -73,7 +74,8 @@ already_AddRefed<MediaDataDecoder> AppleDecoderModule::CreateAudioDecoder(
|
|||
|
||||
bool AppleDecoderModule::SupportsMimeType(
|
||||
const nsACString& aMimeType, DecoderDoctorDiagnostics* aDiagnostics) const {
|
||||
return aMimeType.EqualsLiteral("audio/mpeg") ||
|
||||
return (aMimeType.EqualsLiteral("audio/mpeg") &&
|
||||
!StaticPrefs::media_ffvpx_mp3_enabled()) ||
|
||||
aMimeType.EqualsLiteral("audio/mp4a-latm") ||
|
||||
MP4Decoder::IsH264(aMimeType) || VPXDecoder::IsVP9(aMimeType);
|
||||
}
|
||||
|
|
|
@ -210,6 +210,7 @@ bool WMFDecoderModule::Supports(const TrackInfo& aTrackInfo,
|
|||
return true;
|
||||
}
|
||||
if (aTrackInfo.mMimeType.EqualsLiteral("audio/mpeg") &&
|
||||
!StaticPrefs::media_ffvpx_mp3_enabled() &&
|
||||
CanCreateWMFDecoder<CLSID_CMP3DecMediaObject>()) {
|
||||
return true;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче