commit:     94b3cf1a5e5d1632bbc54ca50555dd70e62ab9ba
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Mon Aug 18 07:19:28 2025 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Mon Aug 18 08:12:26 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=94b3cf1a

media-sound/xmms2: fix build with ffmpeg-8

Sent fix upstream too (not reviewed/merged yet, hopefully correct).

Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 media-sound/xmms2/files/xmms2-0.9.5-ffmpeg8.patch | 30 +++++++++++++++++++++++
 media-sound/xmms2/xmms2-0.9.5-r1.ebuild           |  1 +
 2 files changed, 31 insertions(+)

diff --git a/media-sound/xmms2/files/xmms2-0.9.5-ffmpeg8.patch 
b/media-sound/xmms2/files/xmms2-0.9.5-ffmpeg8.patch
new file mode 100644
index 000000000000..6ba3aa4d1ada
--- /dev/null
+++ b/media-sound/xmms2/files/xmms2-0.9.5-ffmpeg8.patch
@@ -0,0 +1,30 @@
+https://github.com/xmms2/xmms2-devel/pull/63
+--- a/src/plugins/avcodec/avcodec.c
++++ b/src/plugins/avcodec/avcodec.c
+@@ -131,6 +131,5 @@
+       g_return_if_fail (data);
+ 
+-      avcodec_close (data->codecctx);
+-      av_free (data->codecctx);
++      avcodec_free_context (&(data->codecctx));
+       av_frame_free (&data->read_out_frame);
+ 
+@@ -252,5 +251,4 @@
+               } else {
+                       XMMS_DBG ("First read failed, codec is not working...");
+-                      avcodec_close (data->codecctx);
+                       goto err;
+               }
+@@ -261,5 +259,4 @@
+       data->sampleformat = xmms_avcodec_translate_sample_format 
(data->codecctx->sample_fmt);
+       if (data->sampleformat == XMMS_SAMPLE_FORMAT_UNKNOWN) {
+-              avcodec_close (data->codecctx);
+               goto err;
+       }
+@@ -285,5 +282,5 @@
+ err:
+       if (data->codecctx) {
+-              av_free (data->codecctx);
++              avcodec_free_context (&(data->codecctx));
+       }
+       if (data->read_out_frame) {

diff --git a/media-sound/xmms2/xmms2-0.9.5-r1.ebuild 
b/media-sound/xmms2/xmms2-0.9.5-r1.ebuild
index 450f666389b8..29c387ddf6d4 100644
--- a/media-sound/xmms2/xmms2-0.9.5-r1.ebuild
+++ b/media-sound/xmms2/xmms2-0.9.5-r1.ebuild
@@ -133,6 +133,7 @@ QA_CONFIG_IMPL_DECL_SKIP=(
 PATCHES=(
        "${FILESDIR}"/${PN}-0.9.1-cpp-client.patch
        "${FILESDIR}"/${PN}-0.9.1-faad.patch
+       "${FILESDIR}"/${P}-ffmpeg8.patch
 )
 
 src_prepare() {

Reply via email to