firefox: fix flac-no-ffvpx.patch to unbreak ppc64*

This commit is contained in:
q66 2021-04-23 19:17:48 +02:00
parent af784cfcbf
commit 162be019ff

View file

@ -12,15 +12,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("audio/flac"_ns,
+ /* DecoderDoctorDiagnostics* */ nullptr);
+ platform->SupportsMimeType("audio/flac"_ns);
#else
// Until bug 1295886 is fixed.
return false;