From 315c057d4746bdf3795504a5d2002ac321c6bf8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Wed, 14 Feb 2024 02:50:42 +0000 Subject: [PATCH 01/20] Rebuild for jpegxl (libjxl) 0.9.2 with soname bump --- xine-lib.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xine-lib.spec b/xine-lib.spec index c2efcb3..afd35c6 100644 --- a/xine-lib.spec +++ b/xine-lib.spec @@ -32,7 +32,7 @@ Summary: A multimedia engine Name: xine-lib Version: 1.2.13 -Release: 11%{?snapshot:.%{date}hg%{revision}}%{?dist} +Release: 12%{?snapshot:.%{date}hg%{revision}}%{?dist} License: GPL-2.0-or-later URL: https://www.xine-project.org/ %if ! 0%{?snapshot} @@ -345,6 +345,9 @@ mkdir -p %{buildroot}%{codecdir} %changelog +* Wed Feb 14 2024 Sérgio Basto - 1.2.13-12 +- Rebuild for jpegxl (libjxl) 0.9.2 with soname bump + * Thu Feb 08 2024 Pete Walter - 1.2.13-11 - Rebuild for libvpx 1.14.x From 4558856309e71982b6555a5b4596b7957cc9f633 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Wed, 13 Mar 2024 03:10:18 +0000 Subject: [PATCH 02/20] Rebuild for jpegxl (libjxl) 0.10.2 --- xine-lib.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xine-lib.spec b/xine-lib.spec index afd35c6..d1f909a 100644 --- a/xine-lib.spec +++ b/xine-lib.spec @@ -32,7 +32,7 @@ Summary: A multimedia engine Name: xine-lib Version: 1.2.13 -Release: 12%{?snapshot:.%{date}hg%{revision}}%{?dist} +Release: 13%{?snapshot:.%{date}hg%{revision}}%{?dist} License: GPL-2.0-or-later URL: https://www.xine-project.org/ %if ! 0%{?snapshot} @@ -345,6 +345,9 @@ mkdir -p %{buildroot}%{codecdir} %changelog +* Wed Mar 13 2024 Sérgio Basto - 1.2.13-13 +- Rebuild for jpegxl (libjxl) 0.10.2 + * Wed Feb 14 2024 Sérgio Basto - 1.2.13-12 - Rebuild for jpegxl (libjxl) 0.9.2 with soname bump From bacd9126e28956cc0a308e82b0d9723d603f6164 Mon Sep 17 00:00:00 2001 From: Xavier Bachelot Date: Mon, 22 Apr 2024 13:45:17 +0200 Subject: [PATCH 03/20] Add missing libxdg-basedir-devel BR: --- xine-lib.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xine-lib.spec b/xine-lib.spec index d1f909a..b745e41 100644 --- a/xine-lib.spec +++ b/xine-lib.spec @@ -68,6 +68,8 @@ BuildRequires: fontconfig-devel BuildRequires: gcc BuildRequires: gettext-devel BuildRequires: gnutls-devel +# System lib cannot currently be used +#BuildRequires: gsm-devel BuildRequires: gtk2-devel %{!?_without_imagemagick:BuildRequires: ImageMagick-devel} %if 0%{?fedora} || 0%{?rhel} >= 9 @@ -103,6 +105,7 @@ BuildRequires: libvorbis-devel BuildRequires: libvpx-devel BuildRequires: libX11-devel BuildRequires: libxcb-devel +BuildRequires: libxdg-basedir-devel BuildRequires: libXext-devel BuildRequires: libXinerama-devel BuildRequires: libXt-devel From 05b4a7f5965c5bf8b3918f8fb2b5e60a4fb0ba52 Mon Sep 17 00:00:00 2001 From: Xavier Bachelot Date: Mon, 20 May 2024 18:43:04 +0200 Subject: [PATCH 04/20] Add patches for ffmpeg compatibility --- xine-lib-1.2.13-ffmpeg6-compatibility_2.patch | 475 ++++++++++++++++++ xine-lib-1.2.13-ffmpeg7-compatibility.patch | 318 ++++++++++++ xine-lib.spec | 16 +- 3 files changed, 805 insertions(+), 4 deletions(-) create mode 100644 xine-lib-1.2.13-ffmpeg6-compatibility_2.patch create mode 100644 xine-lib-1.2.13-ffmpeg7-compatibility.patch diff --git a/xine-lib-1.2.13-ffmpeg6-compatibility_2.patch b/xine-lib-1.2.13-ffmpeg6-compatibility_2.patch new file mode 100644 index 0000000..d5003ca --- /dev/null +++ b/xine-lib-1.2.13-ffmpeg6-compatibility_2.patch @@ -0,0 +1,475 @@ +# HG changeset patch +# User Torsten Jager +# Date 1715025355 -7200 +# Mon May 06 21:55:55 2024 +0200 +# Node ID 1e7b184008860c8be2289c3cefd9dee57f06193a +# Parent d1954d852980ddc887a67a9f1a26626909561ff5 +ffmpeg compatibility update 1. + +diff -r d1954d852980 -r 1e7b18400886 src/combined/ffmpeg/ff_audio_decoder.c +--- a/src/combined/ffmpeg/ff_audio_decoder.c Mon Apr 08 13:25:10 2024 +0200 ++++ b/src/combined/ffmpeg/ff_audio_decoder.c Mon May 06 21:55:55 2024 +0200 +@@ -1,5 +1,5 @@ + /* +- * Copyright (C) 2001-2023 the xine project ++ * Copyright (C) 2001-2024 the xine project + * + * This file is part of xine, a free video player. + * +@@ -67,6 +67,7 @@ + + xine_t *xine; + float gain; ++ int bitexact; + } ff_audio_class_t; + + typedef struct ff_audio_decoder_s { +@@ -188,14 +189,25 @@ + xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG, + "ffmpeg_audio_dec: found AAC ADTS syncword after %d bytes\n", i); + if (this->buftype == BUF_AUDIO_AAC_LATM) { ++ uint8_t *ed = NULL; ++ int es = 0; + xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG, + "ffmpeg_audio_dec: stream says LATM but is ADTS -> switching decoders\n"); +- if (this->decoder_ok) { +- pthread_mutex_lock (&ffmpeg_lock); +- avcodec_close (this->context); +- pthread_mutex_unlock (&ffmpeg_lock); +- this->decoder_ok = 0; ++ pthread_mutex_lock (&ffmpeg_lock); ++ if (this->context) { ++ ed = this->context->extradata; ++ es = this->context->extradata_size; ++ this->context->extradata = NULL; ++ this->context->extradata_size = 0; ++ XFF_FREE_CONTEXT (this->context); + } ++ this->decoder_ok = 0; ++ this->context = XFF_ALLOC_CONTEXT (); ++ if (this->context) { ++ this->context->extradata = ed; ++ this->context->extradata_size = es; ++ } ++ pthread_mutex_unlock (&ffmpeg_lock); + this->codec = NULL; + ff_audio_open_codec (this, BUF_AUDIO_AAC); + } +@@ -349,6 +361,11 @@ + return -1; + } + ++ if (this->class->bitexact) ++ this->context->flags |= CODEC_FLAG_BITEXACT; ++ else ++ this->context->flags &= ~CODEC_FLAG_BITEXACT; ++ + pthread_mutex_lock (&ffmpeg_lock); + if (XFF_AVCODEC_OPEN (this->context, this->codec) < 0) { + pthread_mutex_unlock (&ffmpeg_lock); +@@ -1377,9 +1394,21 @@ + } + #endif + pthread_mutex_lock (&ffmpeg_lock); +- avcodec_close (this->context); +- if (XFF_AVCODEC_OPEN (this->context, this->codec) < 0) ++ { ++ uint8_t *ed = this->context->extradata; ++ int es = this->context->extradata_size; ++ this->context->extradata = NULL; ++ this->context->extradata_size = 0; ++ XFF_FREE_CONTEXT (this->context); + this->decoder_ok = 0; ++ this->context = XFF_ALLOC_CONTEXT (); ++ if (this->context) { ++ this->context->extradata = ed; ++ this->context->extradata_size = es; ++ } ++ } ++ if (XFF_AVCODEC_OPEN (this->context, this->codec) >= 0) ++ this->decoder_ok = 1; + pthread_mutex_unlock (&ffmpeg_lock); + } + +@@ -1418,20 +1447,20 @@ + XFF_FREE_FRAME (this->av_frame); + } + #endif +- pthread_mutex_lock (&ffmpeg_lock); +- avcodec_close (this->context); +- pthread_mutex_unlock (&ffmpeg_lock); + } ++ pthread_mutex_lock (&ffmpeg_lock); ++ if (this->context) { ++ _x_freep (&this->context->extradata); ++ this->context->extradata_size = 0; ++ XFF_FREE_CONTEXT (this->context); ++ } ++ pthread_mutex_unlock (&ffmpeg_lock); + + ff_audio_output_close(this); + + xine_free_aligned (this->buf); + xine_free_aligned (this->decode_buffer); + +- _x_freep (&this->context->extradata); +- this->context->extradata_size = 0; +- XFF_FREE_CONTEXT (this->context); +- + XFF_PACKET_UNREF (this->avpkt); + + xine_pts_queue_delete (&this->pts_queue); +@@ -1513,6 +1542,12 @@ + free (this); + } + ++static void ff_bitexact_cb (void *user_data, xine_cfg_entry_t *entry) { ++ ff_audio_class_t *class = (ff_audio_class_t *)user_data; ++ ++ class->bitexact = entry->num_value; ++} ++ + void *init_audio_plugin (xine_t *xine, const void *data) { + + ff_audio_class_t *this ; +@@ -1540,5 +1575,12 @@ + 10, ff_gain_cb, this) + / (float)20); + ++ this->bitexact = xine->config->register_bool (xine->config, ++ "audio.processing.ffmpeg_bitexact", 0, ++ _("Let FFmpeg use precise but slower math"), ++ _("Get slightly better sound, at the expense of speed.\n" ++ "Takes effect with next stream."), ++ 10, ff_bitexact_cb, this); ++ + return this; + } +diff -r d1954d852980 -r 1e7b18400886 src/combined/ffmpeg/ff_video_decoder.c +--- a/src/combined/ffmpeg/ff_video_decoder.c Mon Apr 08 13:25:10 2024 +0200 ++++ b/src/combined/ffmpeg/ff_video_decoder.c Mon May 06 21:55:55 2024 +0200 +@@ -1,5 +1,5 @@ + /* +- * Copyright (C) 2001-2022 the xine project ++ * Copyright (C) 2001-2024 the xine project + * + * This file is part of xine, a free video player. + * +@@ -128,6 +128,7 @@ + + int64_t pts; + int64_t last_pts; ++ int64_t tagged_pts; + int video_step; + int reported_video_step; + uint8_t pts_tag_pass; +@@ -551,7 +552,9 @@ + # ifdef XFF_FRAME_AGE + av_frame->age = 1; + # endif ++#ifdef XFF_AVCODEC_REORDERED_OPAQUE + av_frame->reordered_opaque = context->reordered_opaque; ++#endif + + ffsf = ffsf_new (this); + if (!ffsf) +@@ -862,7 +865,9 @@ + # endif + + /* take over pts for this frame to have it reordered */ ++#ifdef XFF_AVCODEC_REORDERED_OPAQUE + av_frame->reordered_opaque = context->reordered_opaque; ++#endif + + return 0; + } +@@ -1142,9 +1147,13 @@ + if (this->codec->id == CODEC_ID_VC1 && + (!this->bih.biWidth || !this->bih.biHeight)) { + /* VC1 codec must be re-opened with correct width and height. */ +- avcodec_close(this->context); +- +- if (XFF_AVCODEC_OPEN (this->context, this->codec) < 0) { ++ if (this->context) { ++ _x_freep (&this->context->extradata); ++ this->context->extradata_size = 0; ++ XFF_FREE_CONTEXT (this->context); ++ } ++ this->context = XFF_ALLOC_CONTEXT (); ++ if (!(this->context && XFF_AVCODEC_OPEN (this->context, this->codec) >= 0)) { + pthread_mutex_unlock(&ffmpeg_lock); + xprintf (this->stream->xine, XINE_VERBOSITY_LOG, + _("ffmpeg_video_dec: couldn't open decoder (pass 2)\n")); +@@ -1211,6 +1220,11 @@ + /* dont want initial AV_NOPTS_VALUE here */ + this->context->reordered_opaque = 0; + #endif ++ ++#ifdef XFF_AVCODEC_FRAME_PTS ++ this->context->time_base.num = 1; ++ this->context->time_base.den = 90000 << 8; ++#endif + } + + #ifdef ENABLE_VAAPI +@@ -1959,7 +1973,26 @@ + return (pts * 256) | this->pts_tag_pass; + } + +-static int64_t ff_untag_pts (ff_video_decoder_t *this, int64_t pts) { ++static int64_t ff_untag_pts (ff_video_decoder_t *this, AVFrame *av_frame) { ++ int64_t pts; ++#if defined(XFF_AVCODEC_FRAME_PTS) ++ pts = (av_frame->pts != AV_NOPTS_VALUE) ? av_frame->pts : 0; ++# if defined(XFF_AVCODEC_REORDERED_OPAQUE) ++ /* paranoia !!! */ ++ if (pts != av_frame->reordered_opaque) { ++ xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG, ++ LOG_MODULE ": WARNING: frame pts %" PRId64 " != reordered_opaque %" PRId64 ".\n", ++ pts, av_frame->reordered_opaque); ++ pts = av_frame->reordered_opaque; ++ } ++ av_frame->reordered_opaque = 0; ++# endif ++#elif defined(XFF_AVCODEC_REORDERED_OPAQUE) ++ pts = av_frame->reordered_opaque; ++ av_frame->reordered_opaque = 0; ++#else ++ pts = this->tagged_pts; ++#endif + if ((uint8_t)(pts & 0xff) == this->pts_tag_pass) { + /* restore sign. */ + return pts >> 8; +@@ -1984,7 +2017,9 @@ + this->avpkt->data = buf; + this->avpkt->size = buf_size; + this->avpkt->flags = AV_PKT_FLAG_KEY; +- ++# ifdef XFF_AVCODEC_FRAME_PTS ++ this->avpkt->pts = this->tagged_pts; ++# endif + # if XFF_PALETTE == 2 || XFF_PALETTE == 3 + if (buf && this->palette_changed) { + uint8_t *sd = av_packet_new_side_data (this->avpkt, AV_PKT_DATA_PALETTE, 256 * 4); +@@ -2094,9 +2129,14 @@ + #endif + + /* apply valid pts to first frame _starting_ thereafter only */ +- if (this->pts && !this->context->reordered_opaque) { +- this->context->reordered_opaque = +- this->av_frame->reordered_opaque = ff_tag_pts (this, this->pts); ++ if (this->pts && !this->tagged_pts) { ++ this->tagged_pts = ff_tag_pts (this, this->pts); ++#ifdef XFF_AVCODEC_REORDERED_OPAQUE ++ this->context->reordered_opaque = this->av_frame->reordered_opaque = this->tagged_pts; ++#endif ++#ifdef XFF_AVCODEC_FRAME_PTS ++ this->av_frame->pts = this->tagged_pts; ++#endif + this->pts = 0; + } + +@@ -2207,9 +2247,11 @@ + img->top_field_first = this->av_frame->top_field_first; + + /* get back reordered pts */ +- img->pts = ff_untag_pts (this, this->av_frame->reordered_opaque); +- this->av_frame->reordered_opaque = 0; ++ img->pts = ff_untag_pts (this, this->av_frame); ++ this->tagged_pts = 0; ++#ifdef XFF_AVCODEC_REORDERED_OPAQUE + this->context->reordered_opaque = 0; ++#endif + + if (this->av_frame->repeat_pict) + img->duration = this->video_step * 3 / 2; +@@ -2330,9 +2372,14 @@ + } + + if (this->size == 0) { ++ this->tagged_pts = ff_tag_pts (this, this->pts); + /* take over pts when we are about to buffer a frame */ +- this->av_frame->reordered_opaque = ff_tag_pts(this, this->pts); +- this->context->reordered_opaque = ff_tag_pts(this, this->pts); ++#ifdef XFF_AVCODEC_REORDERED_OPAQUE ++ this->av_frame->reordered_opaque = this->context->reordered_opaque = this->tagged_pts; ++#endif ++#ifdef XFF_AVCODEC_FRAME_PTS ++ this->av_frame->pts = this->tagged_pts; ++#endif + this->pts = 0; + } + +@@ -2405,7 +2452,10 @@ + need_unref = 1; + #endif + /* reset consumed pts value */ +- this->context->reordered_opaque = ff_tag_pts(this, 0); ++ this->tagged_pts = ff_tag_pts (this, 0); ++#ifdef XFF_AVCODEC_REORDERED_OPAQUE ++ this->context->reordered_opaque = this->tagged_pts; ++#endif + + if (err) { + +@@ -2439,10 +2489,14 @@ + ff_check_bufsize(this, this->size); + memmove (this->buf, &chunk_buf[offset], this->size); + chunk_buf = this->buf; +- + /* take over pts for next access unit */ +- this->av_frame->reordered_opaque = ff_tag_pts(this, this->pts); +- this->context->reordered_opaque = ff_tag_pts(this, this->pts); ++ this->tagged_pts = ff_tag_pts (this, this->pts); ++#ifdef XFF_AVCODEC_REORDERED_OPAQUE ++ this->av_frame->reordered_opaque = this->context->reordered_opaque = this->tagged_pts; ++#endif ++#ifdef XFF_AVCODEC_FRAME_PTS ++ this->av_frame->pts = this->tagged_pts; ++#endif + this->pts = 0; + } + } +@@ -2559,8 +2613,7 @@ + ff_convert_frame(this, img, this->av_frame); + } + +- img->pts = ff_untag_pts(this, this->av_frame->reordered_opaque); +- this->av_frame->reordered_opaque = 0; ++ img->pts = ff_untag_pts(this, this->av_frame); + + /* workaround for weird 120fps streams */ + if( video_step_to_use == 750 ) { +@@ -2600,8 +2653,7 @@ + this->output_format, + VO_BOTH_FIELDS|this->frame_flags); + /* set PTS to allow early syncing */ +- img->pts = ff_untag_pts(this, this->av_frame->reordered_opaque); +- this->av_frame->reordered_opaque = 0; ++ img->pts = ff_untag_pts(this, this->av_frame); + + img->duration = video_step_to_use; + +@@ -2783,7 +2835,7 @@ + ff_convert_frame (this, img, this->av_frame2); + } + +- img->pts = ff_untag_pts (this, this->av_frame2->reordered_opaque); ++ img->pts = ff_untag_pts (this, this->av_frame2); + + if (video_step_to_use == 750) + video_step_to_use = 0; +@@ -2903,7 +2955,9 @@ + if (this->decoder_ok) { + + pthread_mutex_lock(&ffmpeg_lock); +- avcodec_close (this->context); ++ _x_freep (&this->context->extradata); ++ this->context->extradata_size = 0; ++ XFF_FREE_CONTEXT (this->context); + pthread_mutex_unlock(&ffmpeg_lock); + + #ifdef ENABLE_DIRECT_RENDERING +@@ -2912,16 +2966,15 @@ + + this->stream->video_out->close(this->stream->video_out, this->stream); + this->decoder_ok = 0; ++ } else if (this->context) { ++ _x_freep (&this->context->extradata); ++ this->context->extradata_size = 0; ++ XFF_FREE_CONTEXT (this->context); + } + + if (this->slice_offset_table) + free (this->slice_offset_table); + +- if (this->context) { +- _x_freep (&this->context->extradata); +- this->context->extradata_size = 0; +- XFF_FREE_CONTEXT (this->context); +- } + + #if XFF_VIDEO > 1 + XFF_PACKET_UNREF (this->avpkt); +diff -r d1954d852980 -r 1e7b18400886 src/combined/ffmpeg/ffmpeg_compat.h +--- a/src/combined/ffmpeg/ffmpeg_compat.h Mon Apr 08 13:25:10 2024 +0200 ++++ b/src/combined/ffmpeg/ffmpeg_compat.h Mon May 06 21:55:55 2024 +0200 +@@ -1,5 +1,5 @@ + /* +- * Copyright (C) 2000-2022 the xine project ++ * Copyright (C) 2000-2024 the xine project + * + * This file is part of xine, a unix video player. + * +@@ -54,9 +54,16 @@ + #endif + + /* reordered_opaque appeared in libavcodec 51.68.0 */ +-#define XFF_AVCODEC_REORDERED_OPAQUE +-#if LIBAVCODEC_VERSION_INT < XFF_INT_VERSION(51,68,0) +-# undef XFF_AVCODEC_REORDERED_OPAQUE ++#if LIBAVCODEC_VERSION_INT >= XFF_INT_VERSION(51,68,0) && LIBAVCODEC_VERSION_INT < XFF_INT_VERSION(60,0,0) ++# define XFF_AVCODEC_REORDERED_OPAQUE ++#else ++# undef XFF_AVCODEC_REORDERED_OPAQUE ++#endif ++ ++#if LIBAVCODEC_VERSION_INT >= XFF_INT_VERSION(58,33,100) ++# define XFF_AVCODEC_FRAME_PTS ++#else ++# undef XFF_AVCODEC_FRAME_PTS + #endif + + /* colorspace and color_range were added before 52.29.0 */ +@@ -210,9 +217,11 @@ + #endif + + #if LIBAVCODEC_VERSION_INT < XFF_INT_VERSION(55,63,100) +-# define XFF_FREE_CONTEXT(pp) do {av_free(pp); pp = NULL;} while (0) ++# define XFF_FREE_CONTEXT(pp) do {if (pp) avcodec_close (pp); av_free (pp); pp = NULL;} while (0) ++#elif LIBAVCODEC_VERSION_INT < XFF_INT_VERSION(58,33,100) ++# define XFF_FREE_CONTEXT(pp) do {if (pp) avcodec_close (pp); avcodec_free_context (&(pp));} while (0) + #else +-# define XFF_FREE_CONTEXT(pp) avcodec_free_context(&(pp)) ++# define XFF_FREE_CONTEXT(pp) avcodec_free_context (&(pp)) + #endif + + #if LIBAVCODEC_VERSION_INT < XFF_INT_VERSION(54,59,100) +@@ -303,4 +312,3 @@ + #endif /* defined(LIBAVCODEC_VERSION_INT) */ + + #endif /* XINE_AVCODEC_COMPAT_H */ +- +diff -r d1954d852980 -r 1e7b18400886 src/dxr3/ffmpeg_encoder.c +--- a/src/dxr3/ffmpeg_encoder.c Mon Apr 08 13:25:10 2024 +0200 ++++ b/src/dxr3/ffmpeg_encoder.c Mon May 06 21:55:55 2024 +0200 +@@ -1,5 +1,5 @@ + /* +- * Copyright (C) 2000-2022 the xine project ++ * Copyright (C) 2000-2024 the xine project + * + * This file is part of xine, a unix video player. + * +@@ -127,10 +127,8 @@ + unsigned char use_quantizer; + + if (this->context) { +- avcodec_close(this->context); +- free(this->context); ++ XFF_FREE_CONTEXT (this->context); + free(this->picture); +- this->context = NULL; + this->picture = NULL; + } + +@@ -344,10 +342,8 @@ + #if XFF_ENCVIDEO > 1 + XFF_PACKET_UNREF (this->pkt); + #endif +- avcodec_close(this->context); + XFF_FREE_CONTEXT (this->context); + free(this->picture); +- this->context = NULL; + this->picture = NULL; + } + return 1; diff --git a/xine-lib-1.2.13-ffmpeg7-compatibility.patch b/xine-lib-1.2.13-ffmpeg7-compatibility.patch new file mode 100644 index 0000000..1367504 --- /dev/null +++ b/xine-lib-1.2.13-ffmpeg7-compatibility.patch @@ -0,0 +1,318 @@ +# HG changeset patch +# User Torsten Jager +# Date 1715160885 -7200 +# Wed May 08 11:34:45 2024 +0200 +# Node ID 73b833e7fe356cd2d9490dda4ebc9bfe16fce958 +# Parent 1e7b184008860c8be2289c3cefd9dee57f06193a +ffmpeg compatibility update 2. + +diff -r 1e7b18400886 -r 73b833e7fe35 src/combined/ffmpeg/ff_audio_decoder.c +--- a/src/combined/ffmpeg/ff_audio_decoder.c Mon May 06 21:55:55 2024 +0200 ++++ b/src/combined/ffmpeg/ff_audio_decoder.c Wed May 08 11:34:45 2024 +0200 +@@ -1393,6 +1393,9 @@ + XFF_FREE_FRAME (this->av_frame); + } + #endif ++#if 1 ++ avcodec_flush_buffers (this->context); ++#else + pthread_mutex_lock (&ffmpeg_lock); + { + uint8_t *ed = this->context->extradata; +@@ -1410,6 +1413,7 @@ + if (XFF_AVCODEC_OPEN (this->context, this->codec) >= 0) + this->decoder_ok = 1; + pthread_mutex_unlock (&ffmpeg_lock); ++#endif + } + + ff_audio_reset_parser(this); +diff -r 1e7b18400886 -r 73b833e7fe35 src/combined/ffmpeg/ff_video_decoder.c +--- a/src/combined/ffmpeg/ff_video_decoder.c Mon May 06 21:55:55 2024 +0200 ++++ b/src/combined/ffmpeg/ff_video_decoder.c Wed May 08 11:34:45 2024 +0200 +@@ -89,6 +89,11 @@ + # define ENABLE_EMMS + #endif + ++/* ++#undef XFF_AVCODEC_SLICE_TABLE ++#define XFF_AVCODEC_SLICE_TABLE 1 ++*/ ++ + #define VIDEOBUFSIZE (128*1024) + #define SLICE_BUFFER_SIZE (1194*1024) + +@@ -148,11 +153,11 @@ + int bufsize; + int size; + int skipframes; +- ++#if XFF_AVCODEC_SLICE_TABLE == 1 + int *slice_offset_table; + int slice_offset_size; + int slice_offset_pos; +- ++#endif + AVFrame *av_frame; + AVFrame *av_frame2; + AVCodecContext *context; +@@ -238,6 +243,13 @@ + #if XFF_VIDEO > 1 + XFF_PACKET_DECL (avpkt); + #endif ++ ++#if XFF_AVCODEC_SLICE_TABLE == 2 ++ uint8_t *temp_buf; ++ uint32_t temp_size; ++ int slice_num; ++ uint8_t slice_table[1 + 256 * 8]; ++#endif + }; + + /* import color matrix names */ +@@ -1783,10 +1795,9 @@ + this->size += buf->size; + + if (buf->decoder_flags & BUF_FLAG_FRAME_END) { +- int codec_type; ++ uint32_t codec_type = buf->type & 0xFFFF0000; + + lprintf ("header complete\n"); +- codec_type = buf->type & 0xFFFF0000; + + if (buf->decoder_flags & BUF_FLAG_STDHEADER) { + +@@ -1912,33 +1923,44 @@ + #endif + } + else if (buf->decoder_info[1] == BUF_SPECIAL_RV_CHUNK_TABLE) { +- /* o dear. Multiple decoding threads use individual contexts. +- av_decode_video2 () does only copy the _pointer_ to the offsets, +- not the offsets themselves. So we must not overwrite anything +- that another thread has not yet read. */ +- int i, l, total; +- +- lprintf("BUF_SPECIAL_RV_CHUNK_TABLE\n"); +- l = buf->decoder_info[2] + 1; +- +- total = l * this->class->thread_count; +- if (total < SLICE_OFFSET_SIZE) +- total = SLICE_OFFSET_SIZE; +- if (total > this->slice_offset_size) { +- this->slice_offset_table = realloc (this->slice_offset_table, total * sizeof (int)); +- this->slice_offset_size = total; +- } +- +- if (this->slice_offset_pos + l > this->slice_offset_size) +- this->slice_offset_pos = 0; +- this->context->slice_offset = this->slice_offset_table + this->slice_offset_pos; +- this->context->slice_count = l; +- +- lprintf ("slice_count=%d\n", l); +- for (i = 0; i < l; i++) { +- this->slice_offset_table[this->slice_offset_pos++] = +- ((uint32_t *)buf->decoder_info_ptr[2])[(2 * i) + 1]; +- lprintf("slice_offset[%d]=%d\n", i, this->context->slice_offset[i]); ++ { ++#if XFF_AVCODEC_SLICE_TABLE == 1 ++ /* o dear. Multiple decoding threads use individual contexts. ++ * av_decode_video2 () does only copy the _pointer_ to the offsets, ++ * not the offsets themselves. So we must not overwrite anything ++ * that another thread has not yet read. */ ++ int i, l, total; ++ ++ lprintf("BUF_SPECIAL_RV_CHUNK_TABLE\n"); ++ l = buf->decoder_info[2] + 1; ++ ++ total = l * this->class->thread_count; ++ if (total < SLICE_OFFSET_SIZE) ++ total = SLICE_OFFSET_SIZE; ++ if (total > this->slice_offset_size) { ++ this->slice_offset_table = realloc (this->slice_offset_table, total * sizeof (int)); ++ this->slice_offset_size = total; ++ } ++ ++ if (this->slice_offset_pos + l > this->slice_offset_size) ++ this->slice_offset_pos = 0; ++ this->context->slice_offset = this->slice_offset_table + this->slice_offset_pos; ++ this->context->slice_count = l; ++ ++ lprintf ("slice_count=%d\n", l); ++ for (i = 0; i < l; i++) { ++ this->slice_offset_table[this->slice_offset_pos++] = ++ ((uint32_t *)buf->decoder_info_ptr[2])[(2 * i) + 1]; ++ lprintf("slice_offset[%d]=%d\n", i, this->context->slice_offset[i]); ++ } ++#elif XFF_AVCODEC_SLICE_TABLE == 2 ++ /* (count-1):1, 1:4, (offs[0]):4, 1:4, (offs[1]:4, ... just in front of the frame bitstream. ++ * reverse engineered from ffmpeg/libavcodec/rv34.c. they seem to expect no ++ * external use of rv decoders, and did not document this. */ ++ this->slice_table[0] = buf->decoder_info[2]; ++ this->slice_num = this->slice_table[0] + 1; ++ memcpy (this->slice_table + 1, buf->decoder_info_ptr[2], 8 * this->slice_num); ++#endif + } + } + } +@@ -2004,6 +2026,7 @@ + + static int decode_video_wrapper (ff_video_decoder_t *this, + AVFrame *av_frame, int *err, void *buf, size_t buf_size) { ++ uint32_t tsize = 0; + int len; + + #if ENABLE_VAAPI +@@ -2013,9 +2036,32 @@ + } + #endif /* ENABLE_VAAPI */ + ++#if XFF_AVCODEC_SLICE_TABLE == 2 ++ if ((this->slice_num > 0) && buf) { ++ uint32_t nsize; ++ tsize = 1 + this->slice_num * 8; ++ nsize = tsize + buf_size + AV_INPUT_BUFFER_PADDING_SIZE; ++ if (this->temp_size < nsize) { ++ nsize = nsize * 3 / 2; ++ free (this->temp_buf); ++ this->temp_buf = malloc (nsize); ++ if (!this->temp_buf) ++ nsize = 0; ++ this->temp_size = nsize; ++ nsize = tsize + buf_size + AV_INPUT_BUFFER_PADDING_SIZE; ++ } ++ if (this->temp_size >= nsize) { ++ memcpy (this->temp_buf, this->slice_table, tsize); ++ memcpy (this->temp_buf + tsize, buf, buf_size + AV_INPUT_BUFFER_PADDING_SIZE); ++ buf = this->temp_buf; ++ } ++ this->slice_num = 0; ++ } ++#endif ++ + #if XFF_VIDEO > 1 + this->avpkt->data = buf; +- this->avpkt->size = buf_size; ++ this->avpkt->size = buf_size + tsize; + this->avpkt->flags = AV_PKT_FLAG_KEY; + # ifdef XFF_AVCODEC_FRAME_PTS + this->avpkt->pts = this->tagged_pts; +@@ -2486,7 +2532,6 @@ + this->size -= len; + + if (this->size > 0) { +- ff_check_bufsize(this, this->size); + memmove (this->buf, &chunk_buf[offset], this->size); + chunk_buf = this->buf; + /* take over pts for next access unit */ +@@ -2615,8 +2660,8 @@ + + img->pts = ff_untag_pts(this, this->av_frame); + +- /* workaround for weird 120fps streams */ +- if( video_step_to_use == 750 ) { ++ /* workaround for weird 120fps streams, as well as some rv20 with frame duration 3pts. */ ++ if (video_step_to_use <= 750) { + /* fallback to the VIDEO_PTS_MODE */ + video_step_to_use = 0; + } +@@ -2837,7 +2882,7 @@ + + img->pts = ff_untag_pts (this, this->av_frame2); + +- if (video_step_to_use == 750) ++ if (video_step_to_use <= 750) + video_step_to_use = 0; + img->duration = this->av_frame2->repeat_pict ? video_step_to_use * 3 / 2 : video_step_to_use; + img->progressive_frame = !this->av_frame2->interlaced_frame; +@@ -2941,6 +2986,9 @@ + mpeg_parser_reset(this->mpeg_parser); + + /* this->pts_tag_pass = 0; */ ++#if XFF_AVCODEC_SLICE_TABLE == 2 ++ this->slice_num = 0; ++#endif + } + + static void ff_dispose (video_decoder_t *this_gen) { +@@ -2953,12 +3001,15 @@ + rgb2yuy2_free (this->rgb2yuy2); + + if (this->decoder_ok) { ++ uint8_t *ed; + + pthread_mutex_lock(&ffmpeg_lock); +- _x_freep (&this->context->extradata); ++ ed = this->context->extradata; ++ this->context->extradata = NULL; + this->context->extradata_size = 0; + XFF_FREE_CONTEXT (this->context); + pthread_mutex_unlock(&ffmpeg_lock); ++ _x_freep (&ed); + + #ifdef ENABLE_DIRECT_RENDERING + ff_free_dr1_frames (this, 1); +@@ -2972,9 +3023,11 @@ + XFF_FREE_CONTEXT (this->context); + } + +- if (this->slice_offset_table) +- free (this->slice_offset_table); +- ++#if XFF_AVCODEC_SLICE_TABLE == 1 ++ free (this->slice_offset_table); ++#elif XFF_AVCODEC_SLICE_TABLE == 2 ++ free (this->temp_buf); ++#endif + + #if XFF_VIDEO > 1 + XFF_PACKET_UNREF (this->avpkt); +@@ -3062,21 +3115,25 @@ + this->decoder_ok = 0; + this->aspect_ratio = 0; + this->pts_tag_pass = 0; +-#ifdef HAVE_POSTPROC ++# ifdef HAVE_POSTPROC + this->pp_quality = 0; + this->our_context = NULL; + this->our_mode = NULL; +-#endif ++# endif + this->mpeg_parser = NULL; + this->set_stream_info = 0; + this->rgb2yuy2 = NULL; +-#ifdef ENABLE_VAAPI ++# ifdef ENABLE_VAAPI + this->accel = NULL; + this->accel_img = NULL; +-#endif +-#if XFF_VIDEO == 3 ++# endif ++# if XFF_VIDEO == 3 + this->flush_packet_sent = 0; +-#endif ++# endif ++# if XFF_AVCODEC_SLICE_TABLE == 2 ++ this->temp_size = 0; ++ this->temp_buf = NULL; ++# endif + #endif + + this->video_decoder.decode_data = ff_decode_data; +diff -r 1e7b18400886 -r 73b833e7fe35 src/combined/ffmpeg/ffmpeg_compat.h +--- a/src/combined/ffmpeg/ffmpeg_compat.h Mon May 06 21:55:55 2024 +0200 ++++ b/src/combined/ffmpeg/ffmpeg_compat.h Wed May 08 11:34:45 2024 +0200 +@@ -139,6 +139,14 @@ + # define XFF_PALETTE 3 + #endif + ++#if LIBAVCODEC_VERSION_INT < XFF_INT_VERSION(59,42,100) ++/* AVCodecContext.slice_{offset,count} */ ++# define XFF_AVCODEC_SLICE_TABLE 1 ++#else ++/* inline offset table before the frame. */ ++# define XFF_AVCODEC_SLICE_TABLE 2 ++#endif ++ + #if LIBAVCODEC_VERSION_INT < XFF_INT_VERSION(59,0,100) /** << revise this */ + # define XFF_VAAPI 1 /** << libavcodec/vaapi.h */ + #else diff --git a/xine-lib.spec b/xine-lib.spec index b745e41..5967f9c 100644 --- a/xine-lib.spec +++ b/xine-lib.spec @@ -26,13 +26,13 @@ %endif #global snapshot 1 -#global date 20220307 -#global revision 15076 +%global date 20240508 +%global revision 15289 Summary: A multimedia engine Name: xine-lib Version: 1.2.13 -Release: 13%{?snapshot:.%{date}hg%{revision}}%{?dist} +Release: 14%{?snapshot:.%{date}hg%{revision}}%{?dist} License: GPL-2.0-or-later URL: https://www.xine-project.org/ %if ! 0%{?snapshot} @@ -46,7 +46,12 @@ Source1: make_xinelib_snapshot.sh # ffmpeg6 compatibility # See: https://sourceforge.net/p/xine/xine-lib-1.2/ci/771f4ae27e582123ff3500444718fc8f96186d74/ Patch0: xine-lib-1.2.13-ffmpeg6-compatibility.patch -Patch1: xine-lib-configure-c99.patch +# +Patch1: xine-lib-configure-c99.patch +# See: https://sourceforge.net/p/xine/xine-lib-1.2/ci/1e7b184008860c8be2289c3cefd9dee57f06193a/ +Patch2: xine-lib-1.2.13-ffmpeg6-compatibility_2.patch +# See: https://sourceforge.net/p/xine/xine-lib-1.2/ci/73b833e7fe356cd2d9490dda4ebc9bfe16fce958/ +Patch3: xine-lib-1.2.13-ffmpeg7-compatibility.patch Provides: xine-lib(plugin-abi) = %{plugin_abi} Provides: xine-lib(plugin-abi)%{?_isa} = %{plugin_abi} @@ -348,6 +353,9 @@ mkdir -p %{buildroot}%{codecdir} %changelog +* Mon May 20 2024 Xavier Bachelot - 1.2.13-14 +- Add patches for ffmpeg compatibility + * Wed Mar 13 2024 Sérgio Basto - 1.2.13-13 - Rebuild for jpegxl (libjxl) 0.10.2 From fc1834bfb914cd0ab0dd2c4d77751dc66ddfc1db Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Tue, 16 Jul 2024 20:47:08 +0200 Subject: [PATCH 05/20] Rebuilt for libplacebo/vmaf --- xine-lib.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xine-lib.spec b/xine-lib.spec index 5967f9c..f755e44 100644 --- a/xine-lib.spec +++ b/xine-lib.spec @@ -32,7 +32,7 @@ Summary: A multimedia engine Name: xine-lib Version: 1.2.13 -Release: 14%{?snapshot:.%{date}hg%{revision}}%{?dist} +Release: 15%{?snapshot:.%{date}hg%{revision}}%{?dist} License: GPL-2.0-or-later URL: https://www.xine-project.org/ %if ! 0%{?snapshot} @@ -353,6 +353,9 @@ mkdir -p %{buildroot}%{codecdir} %changelog +* Tue Jul 16 2024 Nicolas Chauvet - 1.2.13-15 +- Rebuilt for libplacebo/vmaf + * Mon May 20 2024 Xavier Bachelot - 1.2.13-14 - Add patches for ffmpeg compatibility From e88dba6c2ed35ac91fc60732b567125ba7b4bb74 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 20 Jul 2024 10:08:03 +0000 Subject: [PATCH 06/20] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- xine-lib.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xine-lib.spec b/xine-lib.spec index f755e44..9933125 100644 --- a/xine-lib.spec +++ b/xine-lib.spec @@ -32,7 +32,7 @@ Summary: A multimedia engine Name: xine-lib Version: 1.2.13 -Release: 15%{?snapshot:.%{date}hg%{revision}}%{?dist} +Release: 16%{?snapshot:.%{date}hg%{revision}}%{?dist} License: GPL-2.0-or-later URL: https://www.xine-project.org/ %if ! 0%{?snapshot} @@ -353,6 +353,9 @@ mkdir -p %{buildroot}%{codecdir} %changelog +* Sat Jul 20 2024 Fedora Release Engineering - 1.2.13-16 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Tue Jul 16 2024 Nicolas Chauvet - 1.2.13-15 - Rebuilt for libplacebo/vmaf From 1f48720efe66606bce9f445eba14a4b4b38afe12 Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Mon, 23 Sep 2024 17:02:56 +0200 Subject: [PATCH 07/20] Rebuild for ffmpeg 7 --- xine-lib.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xine-lib.spec b/xine-lib.spec index 9933125..54c7661 100644 --- a/xine-lib.spec +++ b/xine-lib.spec @@ -32,7 +32,7 @@ Summary: A multimedia engine Name: xine-lib Version: 1.2.13 -Release: 16%{?snapshot:.%{date}hg%{revision}}%{?dist} +Release: 17%{?snapshot:.%{date}hg%{revision}}%{?dist} License: GPL-2.0-or-later URL: https://www.xine-project.org/ %if ! 0%{?snapshot} @@ -353,6 +353,9 @@ mkdir -p %{buildroot}%{codecdir} %changelog +* Mon Sep 23 2024 Fabio Valentini - 1.2.13-17 +- Rebuild for ffmpeg 7 + * Sat Jul 20 2024 Fedora Release Engineering - 1.2.13-16 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From a4dadd83d84a20bd23d6a95db4ce7eb240e5ab18 Mon Sep 17 00:00:00 2001 From: Xavier Bachelot Date: Mon, 30 Dec 2024 11:03:05 +0100 Subject: [PATCH 08/20] Rebuild for libnfs 6 --- xine-lib-1.2.13-fix_libnfs6.patch | 32 +++++++++++++++++++++++++++++++ xine-lib.spec | 7 ++++++- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 xine-lib-1.2.13-fix_libnfs6.patch diff --git a/xine-lib-1.2.13-fix_libnfs6.patch b/xine-lib-1.2.13-fix_libnfs6.patch new file mode 100644 index 0000000..174d710 --- /dev/null +++ b/xine-lib-1.2.13-fix_libnfs6.patch @@ -0,0 +1,32 @@ +# HG changeset patch +# User Torsten Jager +# Date 1734473730 -3600 +# Tue Dec 17 23:15:30 2024 +0100 +# Node ID ea7071a960a1ca8719422e80e130994c8f549731 +# Parent 439d26b4081e3f31f21052049e9564082fc80076 +Attempt to fix build with libnfs 6. +Thanks to Xavier Bachelot . + +diff -r 439d26b4081e -r ea7071a960a1 src/input/input_nfs.c +--- a/src/input/input_nfs.c Tue Dec 17 23:15:25 2024 +0100 ++++ b/src/input/input_nfs.c Tue Dec 17 23:15:30 2024 +0100 +@@ -1,5 +1,5 @@ + /* +- * Copyright (C) 2000-2020 the xine project ++ * Copyright (C) 2000-2024 the xine project + * Copyright (C) 2018 Petri Hintukainen + * + * This file is part of xine, a free video player. +@@ -134,7 +134,11 @@ + int rc; + + while (got < len) { +- rc = nfs_read(this->nfs, this->nfsfh, len - got, buf + got); ++#ifdef LIBNFS_API_V2 ++ rc = nfs_read (this->nfs, this->nfsfh, buf + got, len - got); ++#else ++ rc = nfs_read (this->nfs, this->nfsfh, len - got, buf + got); ++#endif + if (rc <= 0) { + if (errno == EAGAIN || errno == EINTR) + continue; diff --git a/xine-lib.spec b/xine-lib.spec index 54c7661..ba7acb1 100644 --- a/xine-lib.spec +++ b/xine-lib.spec @@ -32,7 +32,7 @@ Summary: A multimedia engine Name: xine-lib Version: 1.2.13 -Release: 17%{?snapshot:.%{date}hg%{revision}}%{?dist} +Release: 18%{?snapshot:.%{date}hg%{revision}}%{?dist} License: GPL-2.0-or-later URL: https://www.xine-project.org/ %if ! 0%{?snapshot} @@ -52,6 +52,8 @@ Patch1: xine-lib-configure-c99.patch Patch2: xine-lib-1.2.13-ffmpeg6-compatibility_2.patch # See: https://sourceforge.net/p/xine/xine-lib-1.2/ci/73b833e7fe356cd2d9490dda4ebc9bfe16fce958/ Patch3: xine-lib-1.2.13-ffmpeg7-compatibility.patch +# See: https://sourceforge.net/p/xine/xine-lib-1.2/ci/ea7071a960a1ca8719422e80e130994c8f549731/ +Patch4: xine-lib-1.2.13-fix_libnfs6.patch Provides: xine-lib(plugin-abi) = %{plugin_abi} Provides: xine-lib(plugin-abi)%{?_isa} = %{plugin_abi} @@ -353,6 +355,9 @@ mkdir -p %{buildroot}%{codecdir} %changelog +* Mon Dec 30 2024 Xavier Bachelot - 1.2.13-18 +- Rebuild for libnfs 6 + * Mon Sep 23 2024 Fabio Valentini - 1.2.13-17 - Rebuild for ffmpeg 7 From 569e8ed1f06f0709056b0509fc529bbce6774eb1 Mon Sep 17 00:00:00 2001 From: Xavier Bachelot Date: Mon, 30 Dec 2024 11:04:02 +0100 Subject: [PATCH 09/20] Drop support for EL7 --- xine-lib.spec | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/xine-lib.spec b/xine-lib.spec index ba7acb1..558a235 100644 --- a/xine-lib.spec +++ b/xine-lib.spec @@ -2,13 +2,6 @@ %global plugin_abi 2.11 %global codecdir %{_libdir}/codecs -%if 0%{?el7} - %global _without_dav1d 1 - %global _without_gcrypt 1 - %global _without_png 1 - %global _with_xvmc 1 -%endif - %if 0%{?el8} %global _without_gcrypt 1 %endif @@ -357,6 +350,7 @@ mkdir -p %{buildroot}%{codecdir} %changelog * Mon Dec 30 2024 Xavier Bachelot - 1.2.13-18 - Rebuild for libnfs 6 +- Drop support for EL7 * Mon Sep 23 2024 Fabio Valentini - 1.2.13-17 - Rebuild for ffmpeg 7 From 8a58cbca1c35e85f8979f8630a3bd38c5ec5aca6 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 19 Jan 2025 15:54:39 +0000 Subject: [PATCH 10/20] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- xine-lib.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xine-lib.spec b/xine-lib.spec index 558a235..c90fd38 100644 --- a/xine-lib.spec +++ b/xine-lib.spec @@ -25,7 +25,7 @@ Summary: A multimedia engine Name: xine-lib Version: 1.2.13 -Release: 18%{?snapshot:.%{date}hg%{revision}}%{?dist} +Release: 19%{?snapshot:.%{date}hg%{revision}}%{?dist} License: GPL-2.0-or-later URL: https://www.xine-project.org/ %if ! 0%{?snapshot} @@ -348,6 +348,9 @@ mkdir -p %{buildroot}%{codecdir} %changelog +* Sun Jan 19 2025 Fedora Release Engineering - 1.2.13-19 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Mon Dec 30 2024 Xavier Bachelot - 1.2.13-18 - Rebuild for libnfs 6 - Drop support for EL7 From c230597d896cbf8b4c17f9cb05072ab5e164af8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Tue, 4 Feb 2025 02:35:16 +0000 Subject: [PATCH 11/20] Fix build using global build_type_safety_c 2 more information in /usr/share/doc/redhat-rpm-config/buildflags.md "Controlling Type Safety" --- xine-lib.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xine-lib.spec b/xine-lib.spec index c90fd38..588174d 100644 --- a/xine-lib.spec +++ b/xine-lib.spec @@ -1,3 +1,4 @@ +%global build_type_safety_c 2 %define _legacy_common_support 1 %global plugin_abi 2.11 %global codecdir %{_libdir}/codecs @@ -350,6 +351,8 @@ mkdir -p %{buildroot}%{codecdir} %changelog * Sun Jan 19 2025 Fedora Release Engineering - 1.2.13-19 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild +- Fix build using global build_type_safety_c 2 more information in + /usr/share/doc/redhat-rpm-config/buildflags.md "Controlling Type Safety" * Mon Dec 30 2024 Xavier Bachelot - 1.2.13-18 - Rebuild for libnfs 6 From dcae1d4c62d9cfb614750047096fc3e20e2c58ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= Date: Wed, 5 Feb 2025 21:35:44 +0100 Subject: [PATCH 12/20] Rebuilt for aom 3.11.0 --- xine-lib.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xine-lib.spec b/xine-lib.spec index 588174d..7e48f31 100644 --- a/xine-lib.spec +++ b/xine-lib.spec @@ -26,7 +26,7 @@ Summary: A multimedia engine Name: xine-lib Version: 1.2.13 -Release: 19%{?snapshot:.%{date}hg%{revision}}%{?dist} +Release: 20%{?snapshot:.%{date}hg%{revision}}%{?dist} License: GPL-2.0-or-later URL: https://www.xine-project.org/ %if ! 0%{?snapshot} @@ -349,6 +349,9 @@ mkdir -p %{buildroot}%{codecdir} %changelog +* Wed Feb 05 2025 Robert-André Mauchin - 1.2.13-20 +- Rebuilt for aom 3.11.0 + * Sun Jan 19 2025 Fedora Release Engineering - 1.2.13-19 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild - Fix build using global build_type_safety_c 2 more information in From 49d538fe8225965d9ac5c6daa1f5a7a1c036dddd Mon Sep 17 00:00:00 2001 From: Xavier Bachelot Date: Fri, 7 Feb 2025 23:34:13 +0100 Subject: [PATCH 13/20] Add upstream patch for gcc 15 --- xine-lib-1.2.13-gcc_15.patch | 160 +++++++++++++++++++++++++++++++++++ xine-lib.spec | 19 ++++- 2 files changed, 175 insertions(+), 4 deletions(-) create mode 100644 xine-lib-1.2.13-gcc_15.patch diff --git a/xine-lib-1.2.13-gcc_15.patch b/xine-lib-1.2.13-gcc_15.patch new file mode 100644 index 0000000..d439eb6 --- /dev/null +++ b/xine-lib-1.2.13-gcc_15.patch @@ -0,0 +1,160 @@ +# HG changeset patch +# User Torsten Jager +# Date 1738622090 -3600 +# Mon Feb 03 23:34:50 2025 +0100 +# Node ID a38be398e202da7b8e414969b74fbd65eb34798d +# Parent ea7071a960a1ca8719422e80e130994c8f549731 +Fix qsort compare func. +gcc 15 no longer accepts type (*func) () as a generic pointer +to any fuction returning type, and sometimes also bails on +obvious type pun then dereference. +Thanks to Xavier Bachelot . + +diff -r ea7071a960a1 -r a38be398e202 contrib/libfaad/sbr_fbt.c +--- a/contrib/libfaad/sbr_fbt.c Tue Dec 17 23:15:30 2024 +0100 ++++ b/contrib/libfaad/sbr_fbt.c Mon Feb 03 23:34:50 2025 +0100 +@@ -105,9 +105,11 @@ + } + } + +-static int longcmp(const void *a, const void *b) +-{ +- return ((int)(*(int32_t*)a - *(int32_t*)b)); ++static int longcmp (const void *a, const void *b) { ++ const int32_t *d = (const int32_t *)a; ++ const int32_t *e = (const int32_t *)b; ++ ++ return (int)(*d - *e); + } + + /* calculate the stop QMF channel for the master frequency band table */ +diff -r ea7071a960a1 -r a38be398e202 src/input/input_file.c +--- a/src/input/input_file.c Tue Dec 17 23:15:30 2024 +0100 ++++ b/src/input/input_file.c Mon Feb 03 23:34:50 2025 +0100 +@@ -1,5 +1,5 @@ + /* +- * Copyright (C) 2000-2022 the xine project ++ * Copyright (C) 2000-2025 the xine project + * + * This file is part of xine, a free video player. + * +@@ -649,10 +649,13 @@ + } + + /* +- * Wrapper to file_input_strverscmp() for qsort() calls, which sort mrl_t type array. ++ * Wrapper to file_input_strverscmp () for qsort () calls, which sort mrl_t type array. + */ +-static int file_input_sortfiles_default (const xine_mrl_t *s1, const xine_mrl_t *s2) { +- return(file_input_strverscmp(s1->mrl, s2->mrl)); ++static int file_input_sortfiles_default (const void *a, const void *b) { ++ const xine_mrl_t *d = (const xine_mrl_t *)a; ++ const xine_mrl_t *e = (const xine_mrl_t *)b; ++ ++ return file_input_strverscmp (d->mrl, e->mrl); + } + + /* +@@ -735,7 +738,7 @@ + int num_dir_files = 0; + int num_norm_files = 0; + int num_files = -1; +- int (*func) () = file_input_sortfiles_default; ++ int (*cmp) (const void *a, const void *b) = file_input_sortfiles_default; + int already_tried = 0; + int show_hidden_files; + +@@ -914,14 +917,14 @@ + /* + * Sort arrays + */ +- if(num_dir_files) +- qsort(dir_files, num_dir_files, sizeof(xine_mrl_t), func); ++ if (num_dir_files) ++ qsort (dir_files, num_dir_files, sizeof (xine_mrl_t), cmp); + +- if(num_hide_files) +- qsort(hide_files, num_hide_files, sizeof(xine_mrl_t), func); ++ if (num_hide_files) ++ qsort (hide_files, num_hide_files, sizeof (xine_mrl_t), cmp); + +- if(num_norm_files) +- qsort(norm_files, num_norm_files, sizeof(xine_mrl_t), func); ++ if (num_norm_files) ++ qsort (norm_files, num_norm_files, sizeof (xine_mrl_t), cmp); + + /* + * Add directories entries +diff -r ea7071a960a1 -r a38be398e202 src/input/input_smb.c +--- a/src/input/input_smb.c Tue Dec 17 23:15:30 2024 +0100 ++++ b/src/input/input_smb.c Mon Feb 03 23:34:50 2025 +0100 +@@ -229,10 +229,13 @@ + } + + /* +- * Wrapper to _strverscmp() for qsort() calls, which sort mrl_t type array. ++ * Wrapper to _strverscmp () for qsort () calls, which sort mrl_t type array. + */ +-static int _sortfiles_default(const xine_mrl_t *s1, const xine_mrl_t *s2) { +- return(_strverscmp(s1->mrl, s2->mrl)); ++static int smb_input_sortfiles_default (const void *a, const void *b) { ++ const xine_mrl_t *d = (const xine_mrl_t *)a; ++ const xine_mrl_t *e = (const xine_mrl_t *)b; ++ ++ return file_input_strverscmp (d->mrl, e->mrl); + } + + +@@ -240,7 +243,7 @@ + const char *filename, int *nFiles) { + + smb_input_class_t *this = (smb_input_class_t *) this_gen; +- int (*func) () = _sortfiles_default; ++ int (*cmp) (const void *a, const void *b) = smb_input_sortfiles_default; + int dir; + int i; + struct smbc_dirent *pdirent; +@@ -338,11 +341,11 @@ + /* + * Sort arrays + */ +- if(num_dir_files) +- qsort(dir_files, num_dir_files, sizeof(xine_mrl_t), func); ++ if (num_dir_files) ++ qsort (dir_files, num_dir_files, sizeof (xine_mrl_t), cmp); + +- if(num_norm_files) +- qsort(norm_files, num_norm_files, sizeof(xine_mrl_t), func); ++ if (num_norm_files) ++ qsort (norm_files, num_norm_files, sizeof (xine_mrl_t), cmp); + + /* + * Add directories entries +# HG changeset patch +# User Torsten Jager +# Date 1738881040 -3600 +# Thu Feb 06 23:30:40 2025 +0100 +# Node ID b5fd08a878bb80072ba5b71e30391ab52698c22f +# Parent a38be398e202da7b8e414969b74fbd65eb34798d +Fix qsort compare func 2. +Thanks to Xavier Bachelot . + +diff -r a38be398e202 -r b5fd08a878bb src/input/input_smb.c +--- a/src/input/input_smb.c Mon Feb 03 23:34:50 2025 +0100 ++++ b/src/input/input_smb.c Thu Feb 06 23:30:40 2025 +0100 +@@ -1,5 +1,5 @@ + /* +- * Copyright (C) 2008-2020 the xine project ++ * Copyright (C) 2008-2025 the xine project + * + * This file is part of xine, a free video player. + * +@@ -235,7 +235,7 @@ + const xine_mrl_t *d = (const xine_mrl_t *)a; + const xine_mrl_t *e = (const xine_mrl_t *)b; + +- return file_input_strverscmp (d->mrl, e->mrl); ++ return _strverscmp (d->mrl, e->mrl); + } + + diff --git a/xine-lib.spec b/xine-lib.spec index 7e48f31..7e7dd3e 100644 --- a/xine-lib.spec +++ b/xine-lib.spec @@ -20,13 +20,13 @@ %endif #global snapshot 1 -%global date 20240508 -%global revision 15289 +%global date 20250206 +%global revision 15304 Summary: A multimedia engine Name: xine-lib Version: 1.2.13 -Release: 20%{?snapshot:.%{date}hg%{revision}}%{?dist} +Release: 21%{?snapshot:.%{date}hg%{revision}}%{?dist} License: GPL-2.0-or-later URL: https://www.xine-project.org/ %if ! 0%{?snapshot} @@ -48,6 +48,10 @@ Patch2: xine-lib-1.2.13-ffmpeg6-compatibility_2.patch Patch3: xine-lib-1.2.13-ffmpeg7-compatibility.patch # See: https://sourceforge.net/p/xine/xine-lib-1.2/ci/ea7071a960a1ca8719422e80e130994c8f549731/ Patch4: xine-lib-1.2.13-fix_libnfs6.patch +# See: +# https://sourceforge.net/p/xine/xine-lib-1.2/ci/a38be398e202da7b8e414969b74fbd65eb34798d/ +# https://sourceforge.net/p/xine/xine-lib-1.2/ci/b5fd08a878bb80072ba5b71e30391ab52698c22f/ +Patch5: xine-lib-1.2.13-gcc_15.patch Provides: xine-lib(plugin-abi) = %{plugin_abi} Provides: xine-lib(plugin-abi)%{?_isa} = %{plugin_abi} @@ -150,7 +154,11 @@ This package contains extra plugins for %{name}: %prep -%autosetup -p1 %{?snapshot:-n %{name}-%{version}-%{date}hg%{revision}} +%if ! 0%{?snapshot} +%autosetup -p1 +%else +%setup -n %{name}-%{version}-%{date}hg%{revision} +%endif %build @@ -349,6 +357,9 @@ mkdir -p %{buildroot}%{codecdir} %changelog +* Fri Feb 07 2025 Xavier Bachelot - 1.2.13-21 +- Add upstream patch for gcc 15 + * Wed Feb 05 2025 Robert-André Mauchin - 1.2.13-20 - Rebuilt for aom 3.11.0 From 398a301f1b88657aaa17a663cf6f8c53d9d50235 Mon Sep 17 00:00:00 2001 From: Xavier Bachelot Date: Tue, 18 Feb 2025 23:29:47 +0100 Subject: [PATCH 14/20] Disable w32dll for F42+ --- xine-lib.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/xine-lib.spec b/xine-lib.spec index 7e7dd3e..e6a378c 100644 --- a/xine-lib.spec +++ b/xine-lib.spec @@ -19,6 +19,10 @@ %global have_vidix 0 %endif +%if 0%{fedora} >= 41 || 0%{?rhel} +%global _without_w32dll 1 +%endif + #global snapshot 1 %global date 20250206 %global revision 15304 @@ -181,6 +185,7 @@ autoreconf -fiv --with-libflac \ --without-esound \ --with-wavpack \ +%{?_without_w32dll: --enable-w32dll=no} \ --with-real-codecs-path=%{codecdir} \ --with-w32-path=%{codecdir} @@ -273,7 +278,7 @@ mkdir -p %{buildroot}%{codecdir} %{_libdir}/xine/plugins/%{plugin_abi}/xineplug_decode_to_spdif.so %{_libdir}/xine/plugins/%{plugin_abi}/xineplug_decode_vdpau.so %ifarch %{ix86} -%{_libdir}/xine/plugins/%{plugin_abi}/xineplug_decode_w32dll.so +%{!?_without_w32dll:%{_libdir}/xine/plugins/%{plugin_abi}/xineplug_decode_w32dll.so} %endif %{_libdir}/xine/plugins/%{plugin_abi}/xineplug_dmx_asf.so %{_libdir}/xine/plugins/%{plugin_abi}/xineplug_dmx_audio.so @@ -359,6 +364,7 @@ mkdir -p %{buildroot}%{codecdir} %changelog * Fri Feb 07 2025 Xavier Bachelot - 1.2.13-21 - Add upstream patch for gcc 15 +- Disable w32dll for F42+ * Wed Feb 05 2025 Robert-André Mauchin - 1.2.13-20 - Rebuilt for aom 3.11.0 From 1e2903aa4fb65762ded07e4985a40360f7508392 Mon Sep 17 00:00:00 2001 From: Xavier Bachelot Date: Wed, 5 Mar 2025 15:28:20 +0100 Subject: [PATCH 15/20] Add upstream patch to fix win32dll build with gcc15 --- xine-lib-1.2.13-gcc_15-w32dll.patch | 60 +++++++++++++++++++++++++++++ xine-lib.spec | 11 +++--- 2 files changed, 66 insertions(+), 5 deletions(-) create mode 100644 xine-lib-1.2.13-gcc_15-w32dll.patch diff --git a/xine-lib-1.2.13-gcc_15-w32dll.patch b/xine-lib-1.2.13-gcc_15-w32dll.patch new file mode 100644 index 0000000..aab887e --- /dev/null +++ b/xine-lib-1.2.13-gcc_15-w32dll.patch @@ -0,0 +1,60 @@ +# HG changeset patch +# User Torsten Jager +# Date 1741126505 -3600 +# Tue Mar 04 23:15:05 2025 +0100 +# Node ID 5a68e8b08fd5378780f76c3ab957d790209388db +# Parent b5fd08a878bb80072ba5b71e30391ab52698c22f +(Attempt to) Fix gcc 15 error. +That one no longer accepts "type foo ();" as a prototype +for any set of function parameters. +Thanks to Xavier Bachelot . + +diff -r b5fd08a878bb -r 5a68e8b08fd5 src/libw32dll/wine/win32.c +--- a/src/libw32dll/wine/win32.c Thu Feb 06 23:30:40 2025 +0100 ++++ b/src/libw32dll/wine/win32.c Tue Mar 04 23:15:05 2025 +0100 +@@ -2517,10 +2517,10 @@ + } + + static int WINAPI expEnumDisplayMonitors(void *dc, RECT *r, +- int WINAPI (*callback_proc)(), void *callback_param) ++ int WINAPI (*callback_proc) (int n, void *dc, RECT *r, void *param), void *callback_param) + { + dbgprintf("EnumDisplayMonitors(%p, %p, %p, %p) => ?\n", +- dc, r, callback_proc, callback_param); ++ dc, (void *)r, (void *)callback_proc, callback_param); + return callback_proc(0, dc, r, callback_param); + } + +@@ -2617,10 +2617,10 @@ + return 0; + } + +-static int WINAPI expEnumWindows(int (*callback_func)(), void *callback_param) ++static int WINAPI expEnumWindows(int (*callback_func) (int n, void *param), void *callback_param) + { + int i, i2; +- dbgprintf("EnumWindows(%p, %p) => 1\n", callback_func, callback_param); ++ dbgprintf("EnumWindows(%p, %p) => 1\n", (void *)callback_func, callback_param); + i = callback_func(0, callback_param); + i2 = callback_func(1, callback_param); + return i && i2; +@@ -3506,13 +3506,14 @@ + } + if(strstr(cs1, ".qtx")) + { +- int result; ++ int result = -1; + char* x=strrchr(cs1,'\\'); + char* tmp; +- asprintf(&tmp,"%s/%s",win32_def_path,x?(x+1):cs1); +-// printf("### Open: %s -> %s\n",cs1,tmp); +- result=open(tmp, O_RDONLY); +- free(tmp); ++ if (asprintf (&tmp,"%s/%s",win32_def_path,x?(x+1):cs1) >= 0) { ++ // printf("### Open: %s -> %s\n",cs1,tmp); ++ result = open (tmp, O_RDONLY); ++ free (tmp); ++ } + return result; + } + #endif diff --git a/xine-lib.spec b/xine-lib.spec index e6a378c..7d47bb5 100644 --- a/xine-lib.spec +++ b/xine-lib.spec @@ -19,10 +19,6 @@ %global have_vidix 0 %endif -%if 0%{fedora} >= 41 || 0%{?rhel} -%global _without_w32dll 1 -%endif - #global snapshot 1 %global date 20250206 %global revision 15304 @@ -30,7 +26,7 @@ Summary: A multimedia engine Name: xine-lib Version: 1.2.13 -Release: 21%{?snapshot:.%{date}hg%{revision}}%{?dist} +Release: 22%{?snapshot:.%{date}hg%{revision}}%{?dist} License: GPL-2.0-or-later URL: https://www.xine-project.org/ %if ! 0%{?snapshot} @@ -56,6 +52,8 @@ Patch4: xine-lib-1.2.13-fix_libnfs6.patch # https://sourceforge.net/p/xine/xine-lib-1.2/ci/a38be398e202da7b8e414969b74fbd65eb34798d/ # https://sourceforge.net/p/xine/xine-lib-1.2/ci/b5fd08a878bb80072ba5b71e30391ab52698c22f/ Patch5: xine-lib-1.2.13-gcc_15.patch +# https://sourceforge.net/p/xine/xine-lib-1.2/ci/5a68e8b08fd5378780f76c3ab957d790209388db/ +Patch6: xine-lib-1.2.13-gcc_15-w32dll.patch Provides: xine-lib(plugin-abi) = %{plugin_abi} Provides: xine-lib(plugin-abi)%{?_isa} = %{plugin_abi} @@ -362,6 +360,9 @@ mkdir -p %{buildroot}%{codecdir} %changelog +* Wed Mar 05 2025 Xavier Bachelot - 1.2.13-22 +- Add upstream patch to fix win32dll build with gcc15 + * Fri Feb 07 2025 Xavier Bachelot - 1.2.13-21 - Add upstream patch for gcc 15 - Disable w32dll for F42+ From 1c1f0b2ed59713ee78b8b08029e8caf5ab283963 Mon Sep 17 00:00:00 2001 From: Jitka Plesnikova Date: Tue, 27 May 2025 17:13:40 +0200 Subject: [PATCH 16/20] Rebuilt for flac 1.5.0 --- xine-lib.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xine-lib.spec b/xine-lib.spec index 7d47bb5..4b84bb3 100644 --- a/xine-lib.spec +++ b/xine-lib.spec @@ -26,7 +26,7 @@ Summary: A multimedia engine Name: xine-lib Version: 1.2.13 -Release: 22%{?snapshot:.%{date}hg%{revision}}%{?dist} +Release: 23%{?snapshot:.%{date}hg%{revision}}%{?dist} License: GPL-2.0-or-later URL: https://www.xine-project.org/ %if ! 0%{?snapshot} @@ -360,6 +360,9 @@ mkdir -p %{buildroot}%{codecdir} %changelog +* Tue May 27 2025 Jitka Plesnikova - 1.2.13-23 +- Rebuilt for flac 1.5.0 + * Wed Mar 05 2025 Xavier Bachelot - 1.2.13-22 - Add upstream patch to fix win32dll build with gcc15 From 99ad90a68c9c9829c31e851900f2595438d3fead Mon Sep 17 00:00:00 2001 From: Dominik 'Rathann' Mierzejewski Date: Wed, 25 Jun 2025 18:49:07 +0200 Subject: [PATCH 17/20] Enable FAAD2 support --- xine-lib.spec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/xine-lib.spec b/xine-lib.spec index 4b84bb3..9168713 100644 --- a/xine-lib.spec +++ b/xine-lib.spec @@ -8,8 +8,6 @@ %endif %if 0%{?fedora} || 0%{?rhel} >= 9 -# Not permitted in Fedora, ffmpeg covers this anyway -%global _without_faad2 1 %global _without_fame 1 %endif @@ -26,7 +24,7 @@ Summary: A multimedia engine Name: xine-lib Version: 1.2.13 -Release: 23%{?snapshot:.%{date}hg%{revision}}%{?dist} +Release: 24%{?snapshot:.%{date}hg%{revision}}%{?dist} License: GPL-2.0-or-later URL: https://www.xine-project.org/ %if ! 0%{?snapshot} @@ -360,6 +358,9 @@ mkdir -p %{buildroot}%{codecdir} %changelog +* Wed Jun 25 2025 Dominik Mierzejewski - 1.2.13-24 +- Enable FAAD2 support + * Tue May 27 2025 Jitka Plesnikova - 1.2.13-23 - Rebuilt for flac 1.5.0 From 4efb0e0ab766811ab7d43372513f659f6d7a9963 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 25 Jul 2025 20:52:44 +0000 Subject: [PATCH 18/20] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- xine-lib.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xine-lib.spec b/xine-lib.spec index 9168713..fd6dcfa 100644 --- a/xine-lib.spec +++ b/xine-lib.spec @@ -24,7 +24,7 @@ Summary: A multimedia engine Name: xine-lib Version: 1.2.13 -Release: 24%{?snapshot:.%{date}hg%{revision}}%{?dist} +Release: 25%{?snapshot:.%{date}hg%{revision}}%{?dist} License: GPL-2.0-or-later URL: https://www.xine-project.org/ %if ! 0%{?snapshot} @@ -358,6 +358,9 @@ mkdir -p %{buildroot}%{codecdir} %changelog +* Fri Jul 25 2025 Fedora Release Engineering - 1.2.13-25 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Wed Jun 25 2025 Dominik Mierzejewski - 1.2.13-24 - Enable FAAD2 support From 1c3b9268d7cb2d0d5b0ac0a0b4a87cfb77b1b366 Mon Sep 17 00:00:00 2001 From: Xavier Bachelot Date: Tue, 30 Sep 2025 13:25:12 +0200 Subject: [PATCH 19/20] Add upstream patch for ffmpeg 8 compatibility --- xine-lib-1.2.13-ffmpeg8-compatibility.patch | 148 ++++++++++++++++++++ xine-lib.spec | 8 +- 2 files changed, 155 insertions(+), 1 deletion(-) create mode 100644 xine-lib-1.2.13-ffmpeg8-compatibility.patch diff --git a/xine-lib-1.2.13-ffmpeg8-compatibility.patch b/xine-lib-1.2.13-ffmpeg8-compatibility.patch new file mode 100644 index 0000000..97ec03d --- /dev/null +++ b/xine-lib-1.2.13-ffmpeg8-compatibility.patch @@ -0,0 +1,148 @@ +# HG changeset patch +# User Torsten Jager +# Date 1757753985 -7200 +# Sat Sep 13 10:59:45 2025 +0200 +# Node ID 9bb3977ea7e2b652742b3cdd200b0a4a72eb48bc +# Parent 9e326869fe0faf21957642c8c7c5cac9ed4f445c +FFmpeg compatibilty update. + +diff -r 9e326869fe0f -r 9bb3977ea7e2 src/combined/ffmpeg/ff_video_decoder.c +--- a/src/combined/ffmpeg/ff_video_decoder.c Sat May 31 15:55:00 2025 +0200 ++++ b/src/combined/ffmpeg/ff_video_decoder.c Sat Sep 13 10:59:45 2025 +0200 +@@ -1,5 +1,5 @@ + /* +- * Copyright (C) 2001-2024 the xine project ++ * Copyright (C) 2001-2025 the xine project + * + * This file is part of xine, a free video player. + * +@@ -60,6 +60,10 @@ + + #include "ffmpeg_compat.h" + ++#if XFF_FRAME_RATE == 2 ++# include ++#endif ++ + #if LIBAVCODEC_VERSION_INT >= XFF_INT_VERSION(59,0,100) + # undef HAVE_POSTPROC + #endif +@@ -2289,8 +2293,8 @@ + } + + /* transfer some more frame settings for deinterlacing */ +- img->progressive_frame = !this->av_frame->interlaced_frame; +- img->top_field_first = this->av_frame->top_field_first; ++ img->progressive_frame = !XFF_FRAME_IS_INTERLACED (this->av_frame); ++ img->top_field_first = !!XFF_FRAME_IS_TOP_FIELD_FIRST (this->av_frame); + + /* get back reordered pts */ + img->pts = ff_untag_pts (this, this->av_frame); +@@ -2370,20 +2374,29 @@ + + static int ff_video_step_get (ff_video_decoder_t *this) { + /* use externally provided video_step or fall back to stream's time_base otherwise */ +- int step = this->video_step; ++ int step = this->video_step, num_fields; + if (step || !this->context->time_base.den) + return step; + ++#if XFF_FRAME_RATE == 1 ++ num_fields = this->context->ticks_per_frame; ++#else /* XFF_FRAME_RATE == 2 */ ++ { ++ const AVCodecDescriptor *desc = avcodec_descriptor_get (this->context->codec_id); ++ if (desc) ++ num_fields = (desc->props & AV_CODEC_PROP_FIELDS) ? 2 : 1; ++ else ++ num_fields = 2; ++ } ++#endif + /* good: 2 * 1001 / 48000. */ +- step = (int64_t)90000 * this->context->ticks_per_frame +- * this->context->time_base.num / this->context->time_base.den; ++ step = (int64_t)90000 * num_fields * this->context->time_base.num / this->context->time_base.den; + if (step >= 90) + return step; + + /* bad: 2 * 1 / 60000. seen this once from broken h.264 video usability info (VUI). + * VAAPI seems to apply a similar HACK.*/ +- step = (int64_t)90000000 * this->context->ticks_per_frame +- * this->context->time_base.num / this->context->time_base.den; ++ step = (int64_t)90000000 * num_fields * this->context->time_base.num / this->context->time_base.den; + return step; + } + +@@ -2680,8 +2693,8 @@ + img->duration = video_step_to_use; + + /* transfer some more frame settings for deinterlacing */ +- img->progressive_frame = !this->av_frame->interlaced_frame; +- img->top_field_first = this->av_frame->top_field_first; ++ img->progressive_frame = !XFF_FRAME_IS_INTERLACED (this->av_frame); ++ img->top_field_first = !!XFF_FRAME_IS_TOP_FIELD_FIRST (this->av_frame); + + this->skipframes = img->draw(img, this->stream); + this->state = STATE_FRAME_SENT; +@@ -2894,8 +2907,8 @@ + if (video_step_to_use <= 750) + video_step_to_use = 0; + img->duration = this->av_frame2->repeat_pict ? video_step_to_use * 3 / 2 : video_step_to_use; +- img->progressive_frame = !this->av_frame2->interlaced_frame; +- img->top_field_first = this->av_frame2->top_field_first; ++ img->progressive_frame = !XFF_FRAME_IS_INTERLACED (this->av_frame2); ++ img->top_field_first = !!XFF_FRAME_IS_TOP_FIELD_FIRST (this->av_frame2); + + this->skipframes = img->draw (img, this->stream); + if (free_img) +diff -r 9e326869fe0f -r 9bb3977ea7e2 src/combined/ffmpeg/ffmpeg_compat.h +--- a/src/combined/ffmpeg/ffmpeg_compat.h Sat May 31 15:55:00 2025 +0200 ++++ b/src/combined/ffmpeg/ffmpeg_compat.h Sat Sep 13 10:59:45 2025 +0200 +@@ -1,5 +1,5 @@ + /* +- * Copyright (C) 2000-2024 the xine project ++ * Copyright (C) 2000-2025 the xine project + * + * This file is part of xine, a unix video player. + * +@@ -319,4 +319,20 @@ + # error avcodec.h must be included first ! + #endif /* defined(LIBAVCODEC_VERSION_INT) */ + ++#if LIBAVUTIL_VERSION_INT >= XFF_INT_VERSION(58,7,0) ++# define XFF_FRAME_IS_INTERLACED(_frame) ((_frame)->flags & AV_FRAME_FLAG_INTERLACED) ++# define XFF_FRAME_IS_TOP_FIELD_FIRST(_frame) ((_frame)->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST) ++# define XFF_FRAME_IS_KEY(_frame) ((_frame)->flags & AV_FRAME_FLAG_KEY) ++#else ++# define XFF_FRAME_IS_INTERLACED(_frame) ((_frame)->interlaced_frame) ++# define XFF_FRAME_IS_TOP_FIELD_FIRST(_frame) ((_frame)->top_field_first) ++# define XFF_FRAME_IS_KEY(_frame) ((_frame)->key_frame) ++#endif ++ ++#if LIBAVCODEC_VERSION_INT >= XFF_INT_VERSION(60,0,0) ++# define XFF_FRAME_RATE 2 /* AV_CODEC_PROP_FIELDS */ ++#else ++# define XFF_FRAME_RATE 1 /* AVCodecContext.ticks_per_frame */ ++#endif ++ + #endif /* XINE_AVCODEC_COMPAT_H */ +# HG changeset patch +# User Xavier Bachelot +# Date 1758280185 -7200 +# Fri Sep 19 13:09:45 2025 +0200 +# Node ID a8fffd1193b2247c7f732d4df83dcc03fce96dbe +# Parent 9bb3977ea7e2b652742b3cdd200b0a4a72eb48bc +Fix FFmpeg compatibilty update. + +diff -r 9bb3977ea7e2 -r a8fffd1193b2 src/combined/ffmpeg/ff_video_decoder.c +--- a/src/combined/ffmpeg/ff_video_decoder.c Sat Sep 13 10:59:45 2025 +0200 ++++ b/src/combined/ffmpeg/ff_video_decoder.c Fri Sep 19 13:09:45 2025 +0200 +@@ -61,7 +61,7 @@ + #include "ffmpeg_compat.h" + + #if XFF_FRAME_RATE == 2 +-# include ++# include + #endif + + #if LIBAVCODEC_VERSION_INT >= XFF_INT_VERSION(59,0,100) diff --git a/xine-lib.spec b/xine-lib.spec index fd6dcfa..bf56c1e 100644 --- a/xine-lib.spec +++ b/xine-lib.spec @@ -24,7 +24,7 @@ Summary: A multimedia engine Name: xine-lib Version: 1.2.13 -Release: 25%{?snapshot:.%{date}hg%{revision}}%{?dist} +Release: 26%{?snapshot:.%{date}hg%{revision}}%{?dist} License: GPL-2.0-or-later URL: https://www.xine-project.org/ %if ! 0%{?snapshot} @@ -52,6 +52,9 @@ Patch4: xine-lib-1.2.13-fix_libnfs6.patch Patch5: xine-lib-1.2.13-gcc_15.patch # https://sourceforge.net/p/xine/xine-lib-1.2/ci/5a68e8b08fd5378780f76c3ab957d790209388db/ Patch6: xine-lib-1.2.13-gcc_15-w32dll.patch +# https://sourceforge.net/p/xine/xine-lib-1.2/ci/9bb3977ea7e2b652742b3cdd200b0a4a72eb48bc/ +# https://sourceforge.net/p/xine/xine-lib-1.2/ci/a8fffd1193b2247c7f732d4df83dcc03fce96dbe/ +Patch7: xine-lib-1.2.13-ffmpeg8-compatibility.patch Provides: xine-lib(plugin-abi) = %{plugin_abi} Provides: xine-lib(plugin-abi)%{?_isa} = %{plugin_abi} @@ -358,6 +361,9 @@ mkdir -p %{buildroot}%{codecdir} %changelog +* Mon Sep 15 2025 Xavier Bachelot - 1.2.13-26 +- Add upstream patch for ffmpeg 8 compatibility + * Fri Jul 25 2025 Fedora Release Engineering - 1.2.13-25 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From 94aa352da682d4da7e112a634167c4ba3a46afd8 Mon Sep 17 00:00:00 2001 From: Dominik 'Rathann' Mierzejewski Date: Tue, 4 Nov 2025 23:21:00 +0100 Subject: [PATCH 20/20] Rebuilt for FFmpeg 8 --- xine-lib.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xine-lib.spec b/xine-lib.spec index bf56c1e..635d46d 100644 --- a/xine-lib.spec +++ b/xine-lib.spec @@ -24,7 +24,7 @@ Summary: A multimedia engine Name: xine-lib Version: 1.2.13 -Release: 26%{?snapshot:.%{date}hg%{revision}}%{?dist} +Release: 27%{?snapshot:.%{date}hg%{revision}}%{?dist} License: GPL-2.0-or-later URL: https://www.xine-project.org/ %if ! 0%{?snapshot} @@ -361,6 +361,9 @@ mkdir -p %{buildroot}%{codecdir} %changelog +* Tue Nov 04 2025 Dominik Mierzejewski - 1.2.13-27 +- Rebuilt for FFmpeg 8 + * Mon Sep 15 2025 Xavier Bachelot - 1.2.13-26 - Add upstream patch for ffmpeg 8 compatibility