Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package aubio for openSUSE:Factory checked in at 2022-12-24 14:52:36 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/aubio (Old) and /work/SRC/openSUSE:Factory/.aubio.new.1563 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "aubio" Sat Dec 24 14:52:36 2022 rev:32 rq:1045190 version:0.4.9 Changes: -------- --- /work/SRC/openSUSE:Factory/aubio/aubio.changes 2022-04-11 23:50:59.869869618 +0200 +++ /work/SRC/openSUSE:Factory/.aubio.new.1563/aubio.changes 2022-12-24 14:55:25.588729077 +0100 @@ -1,0 +2,10 @@ +Tue Dec 13 09:19:51 UTC 2022 - Bjørn Lie <bjorn....@gmail.com> + +- Replace pkgconfig(libavresample) with pkgconfig(libswresample) + BuildRequires as ffmpeg-5 does not provide libavresample. +- Add cdfe9ce.patch: [source_avcodec] avoid deprecation warning + with latest avcodec api (58.134.100). +- Add 8a05420.patch: [source_avcodec] define FF_API_LAVF_AVCTX for + libavcodec > 59, thx @berolinux (closes gh-353). + +------------------------------------------------------------------- New: ---- 8a05420.patch cdfe9ce.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ aubio.spec ++++++ --- /var/tmp/diff_new_pack.PIpjzT/_old 2022-12-24 14:55:25.996731457 +0100 +++ /var/tmp/diff_new_pack.PIpjzT/_new 2022-12-24 14:55:26.004731504 +0100 @@ -27,6 +27,11 @@ URL: http://aubio.org Source: http://aubio.org/pub/%{name}-%{version}.tar.bz2 Source1: http://aubio.org/pub/%{name}-%{version}.tar.bz2.asc +# PATCH-FIX-UPSTREAM https://github.com/aubio/aubio/commit/cdfe9ce.patch -- [source_avcodec] avoid deprecation warning with latest avcodec api (58.134.100) +Patch0: cdfe9ce.patch +# PATCH-FIX-UPSTREAM https://github.com/aubio/aubio/commit/8a05420.patch -- [source_avcodec] define FF_API_LAVF_AVCTX for libavcodec > 59, thx @berolinux (closes gh-353) +Patch1: 8a05420.patch + Source99: baselibs.conf BuildRequires: alsa-devel BuildRequires: doxygen @@ -41,7 +46,7 @@ BuildRequires: pkgconfig(libavcodec) BuildRequires: pkgconfig(libavdevice) BuildRequires: pkgconfig(libavformat) -BuildRequires: pkgconfig(libavresample) +BuildRequires: pkgconfig(libswresample) BuildRequires: pkgconfig(libavutil) %endif @@ -81,7 +86,7 @@ This package includes the example programs for aubio library. %prep -%setup -q +%autosetup -p1 # set proper library dir sed -i -e "s#/lib#/%{_lib}#" src/wscript_build # set python3 as testrunner ++++++ 8a05420.patch ++++++ >From 8a05420e5dd8c7b8b2447f82dc919765876511b3 Mon Sep 17 00:00:00 2001 From: Paul Brossier <p...@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) --- 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; ++++++ cdfe9ce.patch ++++++ >From cdfe9cef2dcc3edf7d05ca2e9c2dbbf8dea21f1c Mon Sep 17 00:00:00 2001 From: Paul Brossier <p...@piem.org> Date: Sun, 26 Dec 2021 01:52:16 -0500 Subject: [PATCH] [source_avcodec] avoid deprecation warning with latest avcodec api (58.134.100) --- src/io/source_avcodec.c | 52 +++++++++++++++++++++++++++++++++++------ 1 file changed, 45 insertions(+), 7 deletions(-) diff --git a/src/io/source_avcodec.c b/src/io/source_avcodec.c index 5b25d85cc..e0ae93b5e 100644 --- a/src/io/source_avcodec.c +++ b/src/io/source_avcodec.c @@ -82,7 +82,11 @@ struct _aubio_source_avcodec_t { AVFormatContext *avFormatCtx; AVCodecContext *avCodecCtx; AVFrame *avFrame; +#if FF_API_INIT_PACKET + AVPacket *avPacket; +#else AVPacket avPacket; +#endif #ifdef HAVE_AVRESAMPLE AVAudioResampleContext *avr; #elif defined(HAVE_SWRESAMPLE) @@ -122,10 +126,14 @@ aubio_source_avcodec_t * new_aubio_source_avcodec(const char_t * path, AVFormatContext *avFormatCtx = NULL; AVCodecContext *avCodecCtx = NULL; AVFrame *avFrame = NULL; +#if FF_API_INIT_PACKET + AVPacket *avPacket = NULL; +#endif sint_t selected_stream = -1; #if FF_API_LAVF_AVCTX AVCodecParameters *codecpar; #endif + AVCodec *codec; uint_t i; int err; @@ -277,8 +285,17 @@ aubio_source_avcodec_t * new_aubio_source_avcodec(const char_t * path, avFrame = av_frame_alloc(); if (!avFrame) { AUBIO_ERR("source_avcodec: Could not allocate frame for (%s)\n", s->path); + goto beach; } +#if FF_API_INIT_PACKET + avPacket = av_packet_alloc(); + if (!avPacket) { + AUBIO_ERR("source_avcodec: Could not allocate packet for (%s)\n", s->path); + goto beach; + } +#endif + /* allocate output for avr */ s->output = (smpl_t *)av_malloc(AUBIO_AVCODEC_MAX_BUFFER_SIZE * sizeof(smpl_t)); @@ -289,6 +306,9 @@ aubio_source_avcodec_t * new_aubio_source_avcodec(const char_t * path, s->avFormatCtx = avFormatCtx; s->avCodecCtx = avCodecCtx; s->avFrame = avFrame; +#if FF_API_INIT_PACKET + s->avPacket = avPacket; +#endif aubio_source_avcodec_reset_resampler(s); @@ -354,7 +374,11 @@ void aubio_source_avcodec_readframe(aubio_source_avcodec_t *s, AVFormatContext *avFormatCtx = s->avFormatCtx; AVCodecContext *avCodecCtx = s->avCodecCtx; AVFrame *avFrame = s->avFrame; - AVPacket avPacket = s->avPacket; +#if FF_API_INIT_PACKET + AVPacket *avPacket = s->avPacket; +#else + AVPacket *avPacket = &s->avPacket; +#endif #ifdef HAVE_AVRESAMPLE AVAudioResampleContext *avr = s->avr; #elif defined(HAVE_SWRESAMPLE) @@ -378,12 +402,14 @@ void aubio_source_avcodec_readframe(aubio_source_avcodec_t *s, #else int ret = 0; #endif - av_init_packet (&avPacket); +#ifndef FF_API_INIT_PACKET + av_init_packet (avPacket); +#endif *read_samples = 0; do { - int err = av_read_frame (avFormatCtx, &avPacket); + int err = av_read_frame (avFormatCtx, avPacket); if (err == AVERROR_EOF) { s->eof = 1; goto beach; @@ -396,10 +422,10 @@ void aubio_source_avcodec_readframe(aubio_source_avcodec_t *s, s->eof = 1; goto beach; } - } while (avPacket.stream_index != s->selected_stream); + } while (avPacket->stream_index != s->selected_stream); #if FF_API_LAVF_AVCTX - ret = avcodec_send_packet(avCodecCtx, &avPacket); + ret = avcodec_send_packet(avCodecCtx, avPacket); if (ret < 0 && ret != AVERROR_EOF) { AUBIO_ERR("source_avcodec: error when sending packet for %s\n", s->path); goto beach; @@ -422,7 +448,7 @@ void aubio_source_avcodec_readframe(aubio_source_avcodec_t *s, } } #else - len = avcodec_decode_audio4(avCodecCtx, avFrame, &got_frame, &avPacket); + len = avcodec_decode_audio4(avCodecCtx, avFrame, &got_frame, avPacket); if (len < 0) { AUBIO_ERR("source_avcodec: error while decoding %s\n", s->path); @@ -472,7 +498,7 @@ void aubio_source_avcodec_readframe(aubio_source_avcodec_t *s, *read_samples = out_samples; beach: - av_packet_unref(&avPacket); + av_packet_unref(avPacket); } void aubio_source_avcodec_do(aubio_source_avcodec_t * s, fvec_t * read_data, @@ -638,7 +664,13 @@ uint_t aubio_source_avcodec_close(aubio_source_avcodec_t * s) { avformat_close_input(&s->avFormatCtx); s->avFormatCtx = NULL; } +#if FF_API_INIT_PACKET + if (s->avPacket) { + av_packet_unref(s->avPacket); + } +#else av_packet_unref(&s->avPacket); +#endif return AUBIO_OK; } @@ -653,6 +685,12 @@ void del_aubio_source_avcodec(aubio_source_avcodec_t * s){ av_frame_free( &(s->avFrame) ); } s->avFrame = NULL; +#if FF_API_INIT_PACKET + if (s->avPacket != NULL) { + av_packet_free( &(s->avPacket) ); + } + s->avPacket = NULL; +#endif if (s->path) { AUBIO_FREE(s->path); }