Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package xjadeo for openSUSE:Factory checked in at 2022-09-04 22:11:49 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/xjadeo (Old) and /work/SRC/openSUSE:Factory/.xjadeo.new.2083 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "xjadeo" Sun Sep 4 22:11:49 2022 rev:7 rq:1001092 version:0.8.11 Changes: -------- --- /work/SRC/openSUSE:Factory/xjadeo/xjadeo.changes 2022-07-13 13:46:03.102088313 +0200 +++ /work/SRC/openSUSE:Factory/.xjadeo.new.2083/xjadeo.changes 2022-09-04 22:11:59.376320693 +0200 @@ -1,0 +2,5 @@ +Sun Sep 4 05:13:16 UTC 2022 - Bj??rn Lie <[email protected]> + +- Add 973f0046.patch: ffmpeg 5.1 compatibility. + +------------------------------------------------------------------- New: ---- 973f0046.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ xjadeo.spec ++++++ --- /var/tmp/diff_new_pack.kg5dEC/_old 2022-09-04 22:12:00.852324846 +0200 +++ /var/tmp/diff_new_pack.kg5dEC/_new 2022-09-04 22:12:00.860324868 +0200 @@ -25,6 +25,8 @@ Group: Productivity/Multimedia/Sound/Visualization URL: http://xjadeo.sourceforge.net/ Source0: https://sourceforge.net/projects/xjadeo/files/xjadeo/v%{version}/%{name}-%{version}.tar.gz +# PATCH-FIX-UPSTREAM 973f0046.patch -- ffmpeg 5.1 compat +Patch0: https://github.com/x42/xjadeo/commit/973f0046.patch BuildRequires: pkgconfig BuildRequires: update-desktop-files BuildRequires: pkgconfig(alsa) ++++++ 973f0046.patch ++++++ >From 973f0046cf0dad1a5c5d847aaa02c8bfb21b5804 Mon Sep 17 00:00:00 2001 From: Robin Gareus <[email protected]> Date: Fri, 2 Sep 2022 10:26:12 +0200 Subject: [PATCH] ffmpeg 5.1 compat -- closes #51 --- src/xjadeo/ffcompat.h | 11 +++++++++++ src/xjadeo/xjadeo.c | 28 +++++++++++----------------- 2 files changed, 22 insertions(+), 17 deletions(-) diff --git a/src/xjadeo/ffcompat.h b/src/xjadeo/ffcompat.h index b60baad..4aadde9 100644 --- a/src/xjadeo/ffcompat.h +++ b/src/xjadeo/ffcompat.h @@ -151,5 +151,16 @@ register_codecs_compat () #endif } +static inline void +maybe_avcodec_flush_buffers(AVCodecContext *avctx) +{ +#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(59, 26, 100) + if (avctx->codec->flush) { + avcodec_flush_buffers(avctx); + } +#else + avcodec_flush_buffers(avctx); +#endif +} #endif /* FFCOMPAT_H */ diff --git a/src/xjadeo/xjadeo.c b/src/xjadeo/xjadeo.c index d626f92..a8807f3 100644 --- a/src/xjadeo/xjadeo.c +++ b/src/xjadeo/xjadeo.c @@ -575,9 +575,7 @@ static int seek_frame (AVPacket *packet, int64_t framenumber) { seek = av_seek_frame (pFormatCtx, videoStream, fidx[framenumber].seekpts, AVSEEK_FLAG_BACKWARD); } - if (pCodecCtx->codec->flush) { - avcodec_flush_buffers (pCodecCtx); - } + maybe_avcodec_flush_buffers (pCodecCtx); if (seek < 0) { if (!want_quiet) @@ -915,9 +913,7 @@ static int index_frames () { error |= 16; break; } - if (pCodecCtx->codec->flush) { - avcodec_flush_buffers (pCodecCtx); - } + maybe_avcodec_flush_buffers (pCodecCtx); int err = 0; int bailout = 100; @@ -1053,9 +1049,7 @@ static int index_frames () { printf("NOBYTE 2\n"); break; } - if (pCodecCtx->codec->flush) { - avcodec_flush_buffers (pCodecCtx); - } + maybe_avcodec_flush_buffers (pCodecCtx); int64_t pts = AV_NOPTS_VALUE; while (!got_pic) { @@ -1118,9 +1112,7 @@ static int index_frames () { } else { av_seek_frame (pFormatCtx, videoStream, fidx[i].seekpts, AVSEEK_FLAG_BACKWARD); } - if (pCodecCtx->codec->flush) { - avcodec_flush_buffers (pCodecCtx); - } + maybe_avcodec_flush_buffers (pCodecCtx); while (!got_pic) { if (av_read_frame (pFormatCtx, &packet) < 0) { @@ -1192,9 +1184,7 @@ static int index_frames () { } av_seek_frame (pFormatCtx, videoStream, 0, AVSEEK_FLAG_BACKWARD); - if (pCodecCtx->codec->flush) { - avcodec_flush_buffers (pCodecCtx); - } + maybe_avcodec_flush_buffers (pCodecCtx); if (!error) { scan_complete = 1; } @@ -1271,8 +1261,12 @@ static void clear_info () { int open_movie (char* file_name) { int i; - AVCodec *pCodec; - AVStream *av_stream; +#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(59, 0, 100) + AVCodec* pCodec; +#else + AVCodec const* pCodec; +#endif + AVStream* av_stream; if (pFrameFMT) { close_movie ();
