[packages/tvheadend] - rel 2, fix building with ffmpeg 9

baggins baggins at pld-linux.org
Sun Oct 25 21:52:02 CET 2026


commit cb0cc0945d0a9ba88a72c609bcfa846a238de6d5
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sun Oct 25 21:50:52 2026 +0100

    - rel 2, fix building with ffmpeg 9

 ffmpeg9.patch  | 39 +++++++++++++++++++++++++++++++++++++++
 tvheadend.spec |  4 +++-
 2 files changed, 42 insertions(+), 1 deletion(-)
---
diff --git a/tvheadend.spec b/tvheadend.spec
index 1d04821..d2ff3b6 100644
--- a/tvheadend.spec
+++ b/tvheadend.spec
@@ -4,7 +4,7 @@
 
 %define		gitref	8837853a69aa822b0203eb3909c5912dc831312e
 %define		snap	20261019
-%define		rel	1
+%define		rel	2
 
 Summary:	TV streaming server
 Name:		tvheadend
@@ -18,6 +18,7 @@ Source0:	https://github.com/tvheadend/tvheadend/archive/%{gitref}/%{name}-%{snap
 Source1:	%{name}.service
 Source2:	%{name}.sysconfig
 Source3:	%{name}.init
+Patch0:		ffmpeg9.patch
 URL:		https://tvheadend.org/projects/tvheadend
 BuildRequires:	avahi-devel
 BuildRequires:	dbus-devel
@@ -51,6 +52,7 @@ DVB-C, DVB-T, ATSC, IPTV, and Analog video (V4L) as input sources.
 
 %prep
 %setup -q -n %{name}-%{gitref}
+%patch -P0 -p1
 
 %{__sed} -i -e '1s,/usr/bin/env python3$,%{__python3},' lib/py/tvh/tv_meta_{tm,tv}db.py support/tvhmeta
 
diff --git a/ffmpeg9.patch b/ffmpeg9.patch
new file mode 100644
index 0000000..eb9520f
--- /dev/null
+++ b/ffmpeg9.patch
@@ -0,0 +1,39 @@
+--- tvheadend-8837853a69aa822b0203eb3909c5912dc831312e/src/transcoding/codec/codec.c.orig	2026-10-25 21:42:40.464542516 +0100
++++ tvheadend-8837853a69aa822b0203eb3909c5912dc831312e/src/transcoding/codec/codec.c	2026-10-25 21:47:21.945021849 +0100
+@@ -119,7 +119,9 @@
+ tvh_codec_video_init(TVHVideoCodec *self, const AVCodec *codec)
+ {
+     if (!self->pix_fmts) {
+-        self->pix_fmts = codec->pix_fmts;
++        const enum AVPixelFormat* codec_pix_fmts = NULL;
++        avcodec_get_supported_config(NULL, codec, AV_CODEC_CONFIG_PIX_FORMAT, 0, (const void**)&codec_pix_fmts, NULL);
++        self->pix_fmts = codec_pix_fmts;
+     }
+ }
+ 
+@@ -131,16 +133,22 @@
+     };
+ 
+     if (!self->sample_fmts) {
+-        self->sample_fmts = codec->sample_fmts;
++        const enum AVSampleFormat *codec_sample_fmts = NULL;
++        avcodec_get_supported_config(NULL, codec, AV_CODEC_CONFIG_SAMPLE_FORMAT, 0, (const void**)&codec_sample_fmts, NULL);
++        self->sample_fmts = codec_sample_fmts;
+     }
+     if (!self->sample_rates) {
+-        self->sample_rates = codec->supported_samplerates;
++        const int *codec_supported_samplerates = NULL;
++        avcodec_get_supported_config(NULL, codec, AV_CODEC_CONFIG_SAMPLE_RATE, 0, (const void**)&codec_supported_samplerates, NULL);
++        self->sample_rates = codec_supported_samplerates;
+         if (!self->sample_rates)
+             self->sample_rates = default_sample_rates;
+     }
+     if (!self->channel_layouts) {
+ #if LIBAVCODEC_VERSION_MAJOR > 59
+-        self->channel_layouts = codec->ch_layouts;
++        const AVChannelLayout* codec_ch_layouts = NULL;
++        avcodec_get_supported_config(NULL, codec, AV_CODEC_CONFIG_CHANNEL_LAYOUT, 0, (const void**)&codec_ch_layouts, NULL);
++        self->channel_layouts = codec_ch_layouts;
+ #else
+         self->channel_layouts = codec->channel_layouts;
+ #endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/tvheadend.git/commitdiff/cb0cc0945d0a9ba88a72c609bcfa846a238de6d5



More information about the pld-cvs-commit mailing list