[arch-commits] Commit in xmms2/trunk (PKGBUILD ffmpeg5.patch)

Antonio Rojas arojas at gemini.archlinux.org
Thu Jan 27 20:50:32 UTC 2022


    Date: Thursday, January 27, 2022 @ 20:50:32
  Author: arojas
Revision: 1117679

ffmpeg 5 rebuild

Added:
  xmms2/trunk/ffmpeg5.patch
Modified:
  xmms2/trunk/PKGBUILD

---------------+
 PKGBUILD      |   11 ++++++++---
 ffmpeg5.patch |   37 +++++++++++++++++++++++++++++++++++++
 2 files changed, 45 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2022-01-27 20:50:30 UTC (rev 1117678)
+++ PKGBUILD	2022-01-27 20:50:32 UTC (rev 1117679)
@@ -9,7 +9,7 @@
 
 pkgname=xmms2
 pkgver=0.8DrO_o.7391.dedc33d7
-pkgrel=6
+pkgrel=7
 pkgdesc='X-platform Music Multiplexing System 2'
 arch=(x86_64)
 url='https://xmms2.org/'
@@ -55,7 +55,8 @@
         tmpfiles.conf
         sysusers.conf
         system.service
-        user.service)
+        user.service
+        ffmpeg5.patch)
 sha256sums=('SKIP'
             'SKIP'
             'SKIP'
@@ -62,7 +63,8 @@
             '13e3e2720e21d048d776156f8ab17c40d05b70437823da00b3c4cc2e7f7ecf7f'
             'a37e35dedd48fb8fbc2c97d79be8a3d3c3b00191826f6046f730f649cd67812a'
             'a159b18c5959cfe76ca87990ff6879d082bfe9a4c6d674c493461f7f2781f348'
-            '76f1a06b81cec0f5942430401998f6c8cd9cb95d798f97b854f88afd73ffe61d')
+            '76f1a06b81cec0f5942430401998f6c8cd9cb95d798f97b854f88afd73ffe61d'
+            '4a0deb25c83b43f14db8bfe4877f9352b9360239176da3c91824775ea7aff3ef')
 
 prepare() {
   cd xmms2-devel
@@ -75,6 +77,9 @@
   sed -i 's,#include <cdio/cdda.h>,#include <cdio/paranoia/cdda.h>,' src/plugins/cdda/cdda.c
   sed -i 's,libsmbclient.h,samba-4.0/libsmbclient.h,' src/plugins/samba/{samba.c,wscript}
   sed -i 's|Werror|Wno-error|g' waftools/*.py
+
+# Fix build with FFmpeg 5
+  patch -p1 -i ../ffmpeg5.patch
 }
 
 build() {

Added: ffmpeg5.patch
===================================================================
--- ffmpeg5.patch	                        (rev 0)
+++ ffmpeg5.patch	2022-01-27 20:50:32 UTC (rev 1117679)
@@ -0,0 +1,37 @@
+diff --git a/src/plugins/avcodec/avcodec.c b/src/plugins/avcodec/avcodec.c
+index 23fd4615..506d7cd5 100644
+--- a/src/plugins/avcodec/avcodec.c
++++ b/src/plugins/avcodec/avcodec.c
+@@ -477,8 +477,12 @@ xmms_avcodec_internal_decode_some (xmms_avcodec_data_t *data)
+ 	/* clear buffers and reset fields to defaults */
+ 	av_frame_unref (data->read_out_frame);
+ 
+-	bytes_read = avcodec_decode_audio4 (
+-		data->codecctx, data->read_out_frame, &got_frame, &packet);
++        bytes_read = avcodec_send_packet(data->codecctx, &packet);
++        if (bytes_read >= 0 || bytes_read == AVERROR_EOF) {
++            bytes_read = avcodec_receive_frame(data->codecctx, data->read_out_frame);
++            if (bytes_read >= 0 || bytes_read == AVERROR(EAGAIN) || bytes_read == AVERROR_EOF)
++                got_frame = 1;
++        }
+ 
+ 	/* The DTS decoder of ffmpeg is buggy and always returns
+ 	 * the input buffer length, get frame length from header */
+diff --git a/src/plugins/avcodec/wscript b/src/plugins/avcodec/wscript
+index 00b182b2..f204fcf3 100644
+--- a/src/plugins/avcodec/wscript
++++ b/src/plugins/avcodec/wscript
+@@ -40,13 +40,6 @@ def plugin_configure(conf):
+     conf.check_cc(header_name="avcodec.h", uselib="avcodec", type="cshlib", mandatory=False)
+     conf.check_cc(header_name="libavcodec/avcodec.h", uselib="avcodec", type="cshlib", mandatory=False)
+ 
+-    # mandatory function avcodec_decode_audio4 available since
+-    # * ffmpeg: commit e4de716, lavc 53.40.0, release 0.9
+-    # * libav: commit 0eea212, lavc 53.25.0, release 0.8
+-    conf.check_cc(fragment=avcodec_decode_audio4_fragment, uselib="avcodec",
+-                  uselib_store="avcodec_decode_audio4",
+-                  msg="Checking for function avcodec_decode_audio4", mandatory=True)
+-
+     # non-mandatory function avcodec_free_frame since
+     # * ffmpeg: commit 46a3595, lavc 54.59.100, release 1.0
+     # * libav: commit a42aada, lavc 54.28.0, release 9



More information about the arch-commits mailing list