summaryrefslogtreecommitdiff
path: root/firefox/0024-Enable-FLAC-on-platforms-without-ffvpx-via-ffmpeg.patch
diff options
context:
space:
mode:
Diffstat (limited to 'firefox/0024-Enable-FLAC-on-platforms-without-ffvpx-via-ffmpeg.patch')
-rw-r--r--firefox/0024-Enable-FLAC-on-platforms-without-ffvpx-via-ffmpeg.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/firefox/0024-Enable-FLAC-on-platforms-without-ffvpx-via-ffmpeg.patch b/firefox/0024-Enable-FLAC-on-platforms-without-ffvpx-via-ffmpeg.patch
new file mode 100644
index 000000000..2c6a27121
--- /dev/null
+++ b/firefox/0024-Enable-FLAC-on-platforms-without-ffvpx-via-ffmpeg.patch
@@ -0,0 +1,36 @@
+From 58b0385412c6d96eb745e2fc5902df347e629f6d Mon Sep 17 00:00:00 2001
+From: Thomas Deutschmann <whissi@gentoo.org>
+Date: Thu, 29 Apr 2021 18:48:06 +0200
+Subject: [PATCH 28/30] Enable FLAC on platforms without ffvpx via ffmpeg
+
+Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
+---
+ dom/media/flac/FlacDecoder.cpp | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/dom/media/flac/FlacDecoder.cpp b/dom/media/flac/FlacDecoder.cpp
+index 2f205c9aae..68847b0952 100644
+--- a/dom/media/flac/FlacDecoder.cpp
++++ b/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,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);
+ #else
+ return false;
+ #endif
+--
+2.34.1
+

Generated by cgit