1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-20 00:21:35 +00:00

mail/thunderbird: fix build on powerpc64

12537 /wrkdirs/usr/ports/mail/thunderbird/work/thunderbird-91.2.0/dom/media/flac/FlacDecoder.cpp:21:20: error: no matching member function for call to 'SupportsMimeType'
  12538          platform->SupportsMimeType("audio/flac"_ns,
  12539          ~~~~~~~~~~^~~~~~~~~~~~~~~~
  12540 /wrkdirs/usr/ports/mail/thunderbird/work/.build/dist/include/PDMFactory.h:85:15: note: candidate function not viable: no known conversion from 'nullptr_t' to 'const mozilla::PDMFactory::MediaCodecsSupported' (aka 'const EnumSet<mozilla::PDMFactory::MediaCodecs>') for 2nd argument
  12541   static bool SupportsMimeType(const nsACString& aMimeType,
  12542               ^
  12543 /wrkdirs/usr/ports/mail/thunderbird/work/.build/dist/include/PDMFactory.h:47:8: note: candidate function not viable: requires single argument 'aMimeType', but 2 arguments were provided
  12544   bool SupportsMimeType(const nsACString& aMimeType) const;
This commit is contained in:
Piotr Kubaj 2021-10-10 18:14:28 +00:00
parent cf7336e4d5
commit c99e9e4cda

View File

@ -1,8 +1,6 @@
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.orig 2021-04-15 19:44:28 UTC
+++ dom/media/flac/FlacDecoder.cpp
@@ -7,6 +7,7 @@
#include "FlacDecoder.h"
@ -12,15 +10,14 @@ index 53fc3c9937f7..b23771ab80fa 100644
namespace mozilla {
@@ -14,6 +15,11 @@ namespace mozilla {
@@ -14,6 +15,10 @@ 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);
+ platform->SupportsMimeType("audio/flac"_ns);
#else
// Until bug 1295886 is fixed.
return false;
#endif