Files
ports/mail/thunderbird/files/patch-dom_media_flac_FlacDecoder.cpp
T
Christoph Moench-Tegeder ba9052fd39 update mail/thunderbird to 78.2.2
See https://support.mozilla.org/en-US/kb/new-thunderbird-78 for major
changes in Thunderbird 78, the release announcement in
https://blog.thunderbird.net/2020/07/whats-new-in-thunderbird-78/ and
https://blog.thunderbird.net/2020/09/openpgp-in-thunderbird-78/ info
for OpenPGP users. Also check UPDATING 20200918.
Current release notes are in
https://www.thunderbird.net/en-US/thunderbird/78.2.2/releasenotes/

PR:		249346
Submitted by:	jbeich
2020-09-18 10:02:23 +00:00

27 lines
870 B
C++

Enable FLAC on platforms without ffvpx like powerpc*
diff --git dom/media/flac/FlacDecoder.cpp dom/media/flac/FlacDecoder.cpp
index 53fc3c9937f7..b23771ab80fa 100644
--- dom/media/flac/FlacDecoder.cpp
+++ dom/media/flac/FlacDecoder.cpp
@@ -7,6 +7,7 @@
#include "FlacDecoder.h"
#include "MediaContainerType.h"
#include "mozilla/StaticPrefs_media.h"
+#include "PDMFactory.h"
namespace mozilla {
@@ -14,6 +15,11 @@ namespace mozilla {
bool FlacDecoder::IsEnabled() {
#ifdef MOZ_FFVPX
return StaticPrefs::media_flac_enabled();
+#elif defined(MOZ_FFMPEG)
+ RefPtr<PDMFactory> platform = new PDMFactory();
+ return StaticPrefs::media_flac_enabled() &&
+ platform->SupportsMimeType(NS_LITERAL_CSTRING("audio/flac"),
+ /* DecoderDoctorDiagnostics* */ nullptr);
#else
// Until bug 1295886 is fixed.
return false;