Skip to content

Commit

Permalink
mail/thunderbird: fix build on powerpc64
Browse files Browse the repository at this point in the history
  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;
  • Loading branch information
pkubaj committed Oct 10, 2021
1 parent cf7336e commit c99e9e4
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions mail/thunderbird/files/patch-dom_media_flac_FlacDecoder.cpp
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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

0 comments on commit c99e9e4

Please sign in to comment.