commit:     e5e50cadf176b28e2cd8df3e49d2698517bd6ff9
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 12 14:12:34 2025 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Fri Dec 12 14:14:47 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e5e50cad

media-video/subtitlecomposer: Fix build with >=media-video/ffmpeg-8

Closes: https://bugs.gentoo.org/966741
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../files/subtitlecomposer-0.8.2-ffmpeg8.patch     | 42 ++++++++++++++++++++++
 .../subtitlecomposer-0.8.2-r1.ebuild               |  5 ++-
 2 files changed, 46 insertions(+), 1 deletion(-)

diff --git 
a/media-video/subtitlecomposer/files/subtitlecomposer-0.8.2-ffmpeg8.patch 
b/media-video/subtitlecomposer/files/subtitlecomposer-0.8.2-ffmpeg8.patch
new file mode 100644
index 000000000000..76556ccabd2e
--- /dev/null
+++ b/media-video/subtitlecomposer/files/subtitlecomposer-0.8.2-ffmpeg8.patch
@@ -0,0 +1,42 @@
+From 0043f4434886c5aabe99705d40bd7f633b8b73e7 Mon Sep 17 00:00:00 2001
+From: Pino Toscano <[email protected]>
+Date: Tue, 16 Sep 2025 22:17:22 +0200
+Subject: [PATCH] Include libavcodec/avfft.h only when AUDIO_VISUALIZATION is
+ enabled
+
+libavcodec/avfft.h is needed only when the code of AUDIO_VISUALIZATION
+is enabled (and it is off by default). This helps to build with
+FFmpeg 8, which ships libavcodec 62 that drops all the FFT APIs (used
+only within AUDIO_VISUALIZATION).
+---
+ src/videoplayer/backend/videostate.h | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/src/videoplayer/backend/videostate.h 
b/src/videoplayer/backend/videostate.h
+index 80e7fe83..acd9cc3f 100644
+--- a/src/videoplayer/backend/videostate.h
++++ b/src/videoplayer/backend/videostate.h
+@@ -23,7 +23,6 @@
+ 
+ extern "C" {
+ #include "libavformat/avformat.h"
+-#include "libavcodec/avfft.h"
+ #include "libswscale/swscale.h"
+ }
+ 
+@@ -58,6 +57,12 @@ extern "C" {
+ #undef AUDIO_VISUALIZATION
+ #undef VIDEO_SUBTITLE
+ 
++#ifdef AUDIO_VISUALIZATION
++extern "C" {
++#include "libavcodec/avfft.h"
++}
++#endif
++
+ namespace SubtitleComposer {
+ class RenderThread;
+ class GLRenderer;
+-- 
+GitLab
+

diff --git a/media-video/subtitlecomposer/subtitlecomposer-0.8.2-r1.ebuild 
b/media-video/subtitlecomposer/subtitlecomposer-0.8.2-r1.ebuild
index 8f73619ad53e..f2760bcf7f6b 100644
--- a/media-video/subtitlecomposer/subtitlecomposer-0.8.2-r1.ebuild
+++ b/media-video/subtitlecomposer/subtitlecomposer-0.8.2-r1.ebuild
@@ -48,7 +48,10 @@ BDEPEND="
        virtual/pkgconfig
 "
 
-PATCHES=( "${FILESDIR}/${P}-qt-6.10.patch" ) # bug #966626
+PATCHES=(
+       "${FILESDIR}/${P}-qt-6.10.patch" # bug #966626
+       "${FILESDIR}/${P}-ffmpeg8.patch" # bug #966741
+)
 
 src_configure() {
        local mycmakeargs=(

Reply via email to