mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 23:02:20 +00:00
Bug 1583986 - add pref to control ffvpx mp3 decoding so we can turn it off if needed. r=bwc,jya
Differential Revision: https://phabricator.services.mozilla.com/D47499 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
bae04a811a
commit
0821463d17
@ -9,6 +9,7 @@
|
||||
#include "FFmpegAudioDecoder.h"
|
||||
#include "TimeUnits.h"
|
||||
#include "VideoUtils.h"
|
||||
#include "mozilla/StaticPrefs_media.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
@ -264,6 +265,11 @@ MediaResult FFmpegAudioDecoder<LIBAV_VER>::DoDecode(MediaRawData* aSample,
|
||||
AVCodecID FFmpegAudioDecoder<LIBAV_VER>::GetCodecId(
|
||||
const nsACString& aMimeType) {
|
||||
if (aMimeType.EqualsLiteral("audio/mpeg")) {
|
||||
#ifdef FFVPX_VERSION
|
||||
if (!StaticPrefs::media_ffvpx_mp3_enabled()) {
|
||||
return AV_CODEC_ID_NONE;
|
||||
}
|
||||
#endif
|
||||
return AV_CODEC_ID_MP3;
|
||||
} else if (aMimeType.EqualsLiteral("audio/flac")) {
|
||||
return AV_CODEC_ID_FLAC;
|
||||
|
@ -5645,6 +5645,11 @@
|
||||
type: RelaxedAtomicBool
|
||||
value: true
|
||||
mirror: always
|
||||
|
||||
- name: media.ffvpx.mp3.enabled
|
||||
type: RelaxedAtomicBool
|
||||
value: true
|
||||
mirror: always
|
||||
#endif
|
||||
|
||||
#if defined(MOZ_FFMPEG) || defined(MOZ_FFVPX)
|
||||
|
Loading…
Reference in New Issue
Block a user