aubio: Fix build with ffmpeg 5

Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
This commit is contained in:
Andreas Müller
2022-03-01 18:46:47 +01:00
parent 5d75997a1f
commit 6d1fec252b
2 changed files with 29 additions and 2 deletions

View File

@@ -0,0 +1,27 @@
From 8a05420e5dd8c7b8b2447f82dc919765876511b3 Mon Sep 17 00:00:00 2001
From: Paul Brossier <piem@piem.org>
Date: Tue, 25 Jan 2022 18:30:27 +0100
Subject: [PATCH] [source_avcodec] define FF_API_LAVF_AVCTX for libavcodec >
59, thx @berolinux (closes gh-353)
Upstream-Status: Accepted[https://github.com/aubio/aubio/commit/8a05420e5dd8c7b8b2447f82dc919765876511b3]
---
src/io/source_avcodec.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/io/source_avcodec.c b/src/io/source_avcodec.c
index e0ae93b5..1421bd9a 100644
--- a/src/io/source_avcodec.c
+++ b/src/io/source_avcodec.c
@@ -68,6 +68,10 @@
#define AUBIO_AVCODEC_MAX_BUFFER_SIZE AV_INPUT_BUFFER_MIN_SIZE
#endif
+#if LIBAVCODEC_VERSION_MAJOR >= 59
+#define FF_API_LAVF_AVCTX 1
+#endif
+
struct _aubio_source_avcodec_t {
uint_t hop_size;
uint_t samplerate;

View File

@@ -1,6 +1,6 @@
SUMMARY = "aubio is designed for the extraction of annotations from audio signals"
HOMEPAGE = "https://aubio.org/"
LICENSE = "GPLv3"
LICENSE = "GPL-3.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
inherit waf pkgconfig
@@ -17,8 +17,8 @@ SRC_URI = " \
https://aubio.org/pub/${BPN}-${PV}.tar.bz2 \
file://0001-do-not-build-tests.patch \
file://0002-Fix-build-for-python3-only-environments.patch \
file://0003-define_FF_API_LAVF_AVCTX_for_libavcodec_59.patch \
"
SRC_URI[md5sum] = "50c9c63b15a2692378af5d602892f16a"
SRC_URI[sha256sum] = "d48282ae4dab83b3dc94c16cf011bcb63835c1c02b515490e1883049c3d1f3da"
EXTRA_OECONF = " \