diff options
author | trav90 <travawine@palemoon.org> | 2018-10-20 08:24:28 -0500 |
---|---|---|
committer | trav90 <travawine@palemoon.org> | 2018-10-20 08:24:28 -0500 |
commit | 6ddf66542bfbc90056ca86023da7bdefcec31aa8 (patch) | |
tree | 4025c6a417a5dee99ceafb8b4aa6e9863dfa24f6 /dom/media/platforms/agnostic | |
parent | d2499ead93dc4298c0882fe98902acb1b5209f99 (diff) | |
download | UXP-6ddf66542bfbc90056ca86023da7bdefcec31aa8.tar UXP-6ddf66542bfbc90056ca86023da7bdefcec31aa8.tar.gz UXP-6ddf66542bfbc90056ca86023da7bdefcec31aa8.tar.lz UXP-6ddf66542bfbc90056ca86023da7bdefcec31aa8.tar.xz UXP-6ddf66542bfbc90056ca86023da7bdefcec31aa8.zip |
Put AV1 codec behind a pref
Disabled by default.
Diffstat (limited to 'dom/media/platforms/agnostic')
-rw-r--r-- | dom/media/platforms/agnostic/AgnosticDecoderModule.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/dom/media/platforms/agnostic/AgnosticDecoderModule.cpp b/dom/media/platforms/agnostic/AgnosticDecoderModule.cpp index 4d4a90bd4..51ca4e9de 100644 --- a/dom/media/platforms/agnostic/AgnosticDecoderModule.cpp +++ b/dom/media/platforms/agnostic/AgnosticDecoderModule.cpp @@ -5,6 +5,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "AgnosticDecoderModule.h" +#include "MediaPrefs.h" #include "mozilla/Logging.h" #include "OpusDecoder.h" #include "VorbisDecoder.h" @@ -25,7 +26,9 @@ AgnosticDecoderModule::SupportsMimeType(const nsACString& aMimeType, bool supports = VPXDecoder::IsVPX(aMimeType) || #ifdef MOZ_AV1 - AOMDecoder::IsAV1(aMimeType) || + if (MediaPrefs::AV1Enabled()) { + supports |= AOMDecoder::IsAV1(aMimeType); + } #endif OpusDataDecoder::IsOpus(aMimeType) || VorbisDataDecoder::IsVorbis(aMimeType) || @@ -45,7 +48,8 @@ AgnosticDecoderModule::CreateVideoDecoder(const CreateDecoderParams& aParams) m = new VPXDecoder(aParams); } #ifdef MOZ_AV1 - else if (AOMDecoder::IsAV1(aParams.mConfig.mMimeType)) { + else if (AOMDecoder::IsAV1(aParams.mConfig.mMimeType) && + MediaPrefs::AV1Enabled()) { m = new AOMDecoder(aParams); } #endif |