* [Buildroot] [PATCH 1/5] package/gerbera: fix build with ffmpeg 7.0
@ 2026-10-13 21:50 Bernd Kuhls
2026-10-13 21:50 ` [Buildroot] [PATCH 2/5] package/libcamera-apps: " Bernd Kuhls
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Bernd Kuhls @ 2026-10-13 21:50 UTC (permalink / raw)
To: buildroot; +Cc: Fabrice Fontaine
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Cc: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
...-transcode-fix-build-with-ffmpeg-7.0.patch | 60 +++++++++++++++++++
1 file changed, 60 insertions(+)
create mode 100644 package/gerbera/0001-transcode-fix-build-with-ffmpeg-7.0.patch
diff --git a/package/gerbera/0001-transcode-fix-build-with-ffmpeg-7.0.patch b/package/gerbera/0001-transcode-fix-build-with-ffmpeg-7.0.patch
new file mode 100644
index 0000000000..903987ede1
--- /dev/null
+++ b/package/gerbera/0001-transcode-fix-build-with-ffmpeg-7.0.patch
@@ -0,0 +1,60 @@
+From 56bb6e877794c1209e1930e851b8b8642b4b26ba Mon Sep 17 00:00:00 2001
+From: Bernd Kuhls <bernd@kuhls.net>
+Date: Sat, 10 Oct 2026 23:37:15 +0200
+Subject: [PATCH] transcode: fix build with ffmpeg 7.0
+
+Fixes build error with ffmpeg 7.0.3:
+
+src/transcoding/transcode_int_util.cc: In member function
+ 'int StreamContext::createEncoder(AVStream*, AVFormatContext*)':
+src/transcoding/transcode_int_util.cc:608:17: error:
+ 'AV_CODEC_CONFIG_PIX_FORMAT' was not declared in this scope
+src/transcoding/transcode_int_util.cc:607:19: error:
+ 'avcodec_get_supported_config' was not declared in this scope;
+ did you mean 'avcodec_get_hw_config'?
+src/transcoding/transcode_int_util.cc:638:17: error:
+ 'AV_CODEC_CONFIG_SAMPLE_FORMAT' was not declared in this scope
+src/transcoding/transcode_int_util.cc:637:19: error:
+ 'avcodec_get_supported_config' was not declared in this scope;
+ did you mean 'avcodec_get_hw_config'?
+
+Adjust the version check according to ffmpeg docs:
+
+https://code.ffmpeg.org/FFmpeg/FFmpeg/src/tag/n9.0.2/doc/APIchanges#L446
+"2024-09-08 - 3305767560a - lavc 61.13.100 - avcodec.h
+ Add avcodec_get_supported_config() and enum AVCodecConfig; deprecate
+ AVCodec.pix_fmts, AVCodec.sample_fmts, AVCodec.supported_framerates,
+ AVCodec.supported_samplerates and AVCodec.ch_layouts."
+
+Upstream: https://github.com/gerbera/gerbera/commit/73fa1638958fae7db0579b694983164b10946b8d
+
+Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
+---
+ src/transcoding/transcode_int_util.cc | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/transcoding/transcode_int_util.cc b/src/transcoding/transcode_int_util.cc
+index 014942ab9..89964615c 100644
+--- a/src/transcoding/transcode_int_util.cc
++++ b/src/transcoding/transcode_int_util.cc
+@@ -619,7 +619,7 @@ int StreamContext::createEncoder(
+ enc_ctx->sample_aspect_ratio = settings.aspectRatio;
+
+ // Set first supported pixel format
+-#if (LIBAVCODEC_VERSION_INT < AV_VERSION_INT(61, 0, 0))
++#if (LIBAVCODEC_VERSION_INT < AV_VERSION_INT(61, 13, 100))
+ /* take first format from list of supported formats */
+ if (encoder->pix_fmts)
+ enc_ctx->pix_fmt = encoder->pix_fmts[0];
+@@ -652,7 +652,7 @@ int StreamContext::createEncoder(
+ #endif
+
+ // Set first supported sample format
+-#if (LIBAVCODEC_VERSION_INT < AV_VERSION_INT(61, 0, 0))
++#if (LIBAVCODEC_VERSION_INT < AV_VERSION_INT(61, 13, 100))
+ if (encoder->sample_fmts)
+ enc_ctx->sample_fmt = encoder->sample_fmts[0];
+ #else
+--
+2.47.3
+
--
2.47.3
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 2/5] package/libcamera-apps: fix build with ffmpeg 7.0
2026-10-13 21:50 [Buildroot] [PATCH 1/5] package/gerbera: fix build with ffmpeg 7.0 Bernd Kuhls
@ 2026-10-13 21:50 ` Bernd Kuhls
2026-10-13 21:50 ` [Buildroot] [PATCH 3/5] package/kodi: support " Bernd Kuhls
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Bernd Kuhls @ 2026-10-13 21:50 UTC (permalink / raw)
To: buildroot; +Cc: Marcus Folkesson
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Cc: Marcus Folkesson <marcus.folkesson@gmail.com>
---
...ncoder-libav-Updates-for-ffmpeg-v7.1.patch | 48 +++++++++++++++++++
...oder-libav-fix-build-with-ffmpeg-7.0.patch | 37 ++++++++++++++
2 files changed, 85 insertions(+)
create mode 100644 package/libcamera-apps/0003-encoder-libav-Updates-for-ffmpeg-v7.1.patch
create mode 100644 package/libcamera-apps/0004-encoder-libav-fix-build-with-ffmpeg-7.0.patch
diff --git a/package/libcamera-apps/0003-encoder-libav-Updates-for-ffmpeg-v7.1.patch b/package/libcamera-apps/0003-encoder-libav-Updates-for-ffmpeg-v7.1.patch
new file mode 100644
index 0000000000..3b92ac3592
--- /dev/null
+++ b/package/libcamera-apps/0003-encoder-libav-Updates-for-ffmpeg-v7.1.patch
@@ -0,0 +1,48 @@
+From d67bc17a420b6c3519d4cfa24b4b4e5c7293165b Mon Sep 17 00:00:00 2001
+From: Naushir Patuck <naush@raspberrypi.com>
+Date: Wed, 8 Oct 2025 10:51:46 +0100
+Subject: [PATCH] encoder: libav: Updates for ffmpeg v7.1
+
+Fix some API breakages change for ffmpeg v7.1 packaged with Trixie.
+
+Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
+
+Upstream: https://github.com/raspberrypi/rpicam-apps/commit/d67bc17a420b6c3519d4cfa24b4b4e5c7293165b
+
+Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
+---
+ encoder/libav_encoder.cpp | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/encoder/libav_encoder.cpp b/encoder/libav_encoder.cpp
+index 10c00e0..ba8b9fe 100644
+--- a/encoder/libav_encoder.cpp
++++ b/encoder/libav_encoder.cpp
+@@ -337,13 +337,13 @@ void LibAvEncoder::initAudioOutCodec(VideoOptions const *options, StreamInfo con
+ #if LIBAVCODEC_VERSION_MAJOR < 61
+ codec_ctx_[AudioOut]->sample_fmt = codec->sample_fmts[0];
+ #else
+- enum AVSampleFormat **sample_fmts = nullptr;
++ const enum AVSampleFormat *sample_fmts = nullptr;
+ avcodec_get_supported_config(codec_ctx_[AudioOut], codec, AV_CODEC_CONFIG_SAMPLE_FORMAT, 0,
+ (const void **)&sample_fmts, nullptr);
+ if (!sample_fmts)
+ throw std::runtime_error("libav: no supported sample formats for audio codec");
+ else
+- codec_ctx_[AudioOut]->sample_fmt = (*sample_fmts)[0];
++ codec_ctx_[AudioOut]->sample_fmt = sample_fmts[0];
+ #endif
+
+ codec_ctx_[AudioOut]->bit_rate = options->Get().audio_bitrate.bps();
+@@ -652,7 +652,7 @@ void LibAvEncoder::audioThread()
+ uint32_t out_channels = codec_ctx_[AudioOut]->ch_layout.nb_channels;
+ #endif
+
+- SwrContext *conv;
++ SwrContext *conv = nullptr;
+ AVAudioFifo *fifo;
+
+ #if LIBAVUTIL_VERSION_MAJOR < 57
+--
+2.47.3
+
diff --git a/package/libcamera-apps/0004-encoder-libav-fix-build-with-ffmpeg-7.0.patch b/package/libcamera-apps/0004-encoder-libav-fix-build-with-ffmpeg-7.0.patch
new file mode 100644
index 0000000000..ae525b77d2
--- /dev/null
+++ b/package/libcamera-apps/0004-encoder-libav-fix-build-with-ffmpeg-7.0.patch
@@ -0,0 +1,37 @@
+From 1a4860f36cffe167965351b7a59be46d7a7ae5ec Mon Sep 17 00:00:00 2001
+From: Bernd Kuhls <bernd@kuhls.net>
+Date: Sat, 10 Oct 2026 23:58:02 +0200
+Subject: [PATCH] encoder: libav: fix build with ffmpeg 7.0
+
+Adjust the version check according to ffmpeg docs:
+
+https://code.ffmpeg.org/FFmpeg/FFmpeg/src/tag/n9.0.2/doc/APIchanges#L446
+"2024-09-08 - 3305767560a - lavc 61.13.100 - avcodec.h
+ Add avcodec_get_supported_config() and enum AVCodecConfig; deprecate
+ AVCodec.pix_fmts, AVCodec.sample_fmts, AVCodec.supported_framerates,
+ AVCodec.supported_samplerates and AVCodec.ch_layouts."
+
+Upstream: not applicable, support for older ffmpeg versions was removed:
+https://github.com/raspberrypi/rpicam-apps/commit/cbe9921eeddd8e1c2e5798102f485baea5de3f65
+
+Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
+---
+ encoder/libav_encoder.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/encoder/libav_encoder.cpp b/encoder/libav_encoder.cpp
+index 31f5e55..8e24e7d 100644
+--- a/encoder/libav_encoder.cpp
++++ b/encoder/libav_encoder.cpp
+@@ -321,7 +321,7 @@ void LibAvEncoder::initAudioOutCodec(VideoOptions const *options, StreamInfo con
+
+ codec_ctx_[AudioOut]->sample_rate = options->Get().audio_samplerate ? options->Get().audio_samplerate
+ : stream_[AudioIn]->codecpar->sample_rate;
+-#if LIBAVCODEC_VERSION_MAJOR < 61
++#if (LIBAVCODEC_VERSION_INT < AV_VERSION_INT(61, 13, 100))
+ codec_ctx_[AudioOut]->sample_fmt = codec->sample_fmts[0];
+ #else
+ const enum AVSampleFormat *sample_fmts = nullptr;
+--
+2.47.3
+
--
2.47.3
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 3/5] package/kodi: support ffmpeg 7.0
2026-10-13 21:50 [Buildroot] [PATCH 1/5] package/gerbera: fix build with ffmpeg 7.0 Bernd Kuhls
2026-10-13 21:50 ` [Buildroot] [PATCH 2/5] package/libcamera-apps: " Bernd Kuhls
@ 2026-10-13 21:50 ` Bernd Kuhls
2026-10-13 21:50 ` [Buildroot] [PATCH 4/5] package/kodi-inputstream-ffmpegdirect: Fix build with ffmpeg-7.0 Bernd Kuhls
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Bernd Kuhls @ 2026-10-13 21:50 UTC (permalink / raw)
To: buildroot
For details see upstream PR 24972 from which these patches were taken
during its development from a force-push which took place May 29, 2024,
8:13 GMT+2.
Please note that the later patches in this PR for ffmpeg 7.1 are not
compatible with Kodi 21.3. We need to use the 7.0 branch of ffmpeg in
order to prepare for the bump of Kodi to 22.0 which supports ffmpeg
versions >= 7.0:
https://github.com/xbmc/xbmc/commit/72fe098c8436c96763f677b4c65d32988b931b5b
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
package/kodi/0007-Update-to-7.0.patch | 338 ++++++++++++++++++
...cated-use-of-FF_API_INTERLACED_FRAME.patch | 98 +++++
...move-deprecated-use-of-avcodec_close.patch | 30 ++
...precated-use-av_stream_get_side_data.patch | 113 ++++++
...ve-CrystalHD-hw-acceleration-strings.patch | 47 +++
...layerignoredtsinwav-advanced-setting.patch | 51 +++
...Use-new-audio-DTS-and-ATMOS-profiles.patch | 98 +++++
7 files changed, 775 insertions(+)
create mode 100644 package/kodi/0007-Update-to-7.0.patch
create mode 100644 package/kodi/0008-Remove-deprecated-use-of-FF_API_INTERLACED_FRAME.patch
create mode 100644 package/kodi/0009-Remove-deprecated-use-of-avcodec_close.patch
create mode 100644 package/kodi/0010-Remove-deprecated-use-av_stream_get_side_data.patch
create mode 100644 package/kodi/0011-Remove-CrystalHD-hw-acceleration-strings.patch
create mode 100644 package/kodi/0012-Remove-VideoPlayerignoredtsinwav-advanced-setting.patch
create mode 100644 package/kodi/0013-Use-new-audio-DTS-and-ATMOS-profiles.patch
diff --git a/package/kodi/0007-Update-to-7.0.patch b/package/kodi/0007-Update-to-7.0.patch
new file mode 100644
index 0000000000..cc9cbe0960
--- /dev/null
+++ b/package/kodi/0007-Update-to-7.0.patch
@@ -0,0 +1,338 @@
+From fd9fdfd70e4b9e4783de1b6ca11f1925217af559 Mon Sep 17 00:00:00 2001
+From: Stephan Sundermann <stephansundermann@gmail.com>
+Date: Thu, 11 Apr 2024 17:11:32 +0200
+Subject: [PATCH] Update to 7.0
+
+Upstream: https://github.com/xbmc/xbmc/pull/24972#event-12966390666
+
+Patch was cherry-picked from upstream tree:
+https://github.com/xbmc/xbmc/commits/0e935f9edb30fd905f14230af653930b5fe139e8/
+
+[Bernd: removed fixes in xbmc/cdrip/, they are incompatible with ffmpeg
+ 6.1, they will be re-added with the bump of ffmpeg to 7.0]
+Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
+---
+ cmake/modules/FindFFMPEG.cmake | 16 +--
+ tools/buildsteps/windows/ffmpeg_options.txt | 1 -
+ tools/depends/target/ffmpeg/CMakeLists.txt | 6 +-
+ tools/depends/target/ffmpeg/FFMPEG-VERSION | 4 +-
+ .../ActiveAE/ActiveAEResampleFFMPEG.cpp | 110 +++++++++---------
+ .../DVDDemuxers/DVDDemuxFFmpeg.cpp | 71 +----------
+ 6 files changed, 67 insertions(+), 141 deletions(-)
+
+diff --git a/cmake/modules/FindFFMPEG.cmake b/cmake/modules/FindFFMPEG.cmake
+index 6c6bf973de..6bd05e9f3d 100644
+--- a/cmake/modules/FindFFMPEG.cmake
++++ b/cmake/modules/FindFFMPEG.cmake
+@@ -163,14 +163,14 @@ if(WITH_FFMPEG)
+ set(REQUIRED_FFMPEG_VERSION undef)
+ else()
+ # required ffmpeg library versions
+- set(REQUIRED_FFMPEG_VERSION 6.0.0)
+- set(_avcodec_ver ">=60.2.100")
+- set(_avfilter_ver ">=9.3.100")
+- set(_avformat_ver ">=60.3.100")
+- set(_avutil_ver ">=58.2.100")
+- set(_postproc_ver ">=57.1.100")
+- set(_swresample_ver ">=4.10.100")
+- set(_swscale_ver ">=7.1.100")
++ set(REQUIRED_FFMPEG_VERSION 7.0.0)
++ set(_avcodec_ver ">=61.3.100")
++ set(_avfilter_ver ">=10.1.100")
++ set(_avformat_ver ">=61.1.100")
++ set(_avutil_ver ">=59.8.100")
++ set(_postproc_ver ">=58.1.100")
++ set(_swresample_ver ">=5.1.100")
++ set(_swscale_ver ">=8.1.100")
+ endif()
+
+ # Allows building with external ffmpeg not found in system paths,
+diff --git a/tools/buildsteps/windows/ffmpeg_options.txt b/tools/buildsteps/windows/ffmpeg_options.txt
+index 5034ff26c4..776c0b4b35 100644
+--- a/tools/buildsteps/windows/ffmpeg_options.txt
++++ b/tools/buildsteps/windows/ffmpeg_options.txt
+@@ -1,5 +1,4 @@
+ --disable-avdevice
+---disable-crystalhd
+ --disable-cuda
+ --disable-cuvid
+ --disable-devices
+diff --git a/tools/depends/target/ffmpeg/CMakeLists.txt b/tools/depends/target/ffmpeg/CMakeLists.txt
+index 0bbc23540a..86d7db1bba 100644
+--- a/tools/depends/target/ffmpeg/CMakeLists.txt
++++ b/tools/depends/target/ffmpeg/CMakeLists.txt
+@@ -92,14 +92,12 @@ elseif(CORE_SYSTEM_NAME STREQUAL android)
+ list(APPEND ffmpeg_conf --extra-cflags=-mno-stackrealign)
+ endif()
+ elseif(CORE_SYSTEM_NAME STREQUAL darwin_embedded)
+- list(APPEND ffmpeg_conf --disable-crystalhd
+- --enable-videotoolbox
++ list(APPEND ffmpeg_conf --enable-videotoolbox
+ --disable-filter=yadif_videotoolbox
+ --target-os=darwin
+ )
+ elseif(CORE_SYSTEM_NAME STREQUAL osx)
+- list(APPEND ffmpeg_conf --disable-crystalhd
+- --enable-videotoolbox
++ list(APPEND ffmpeg_conf --enable-videotoolbox
+ --target-os=darwin
+ --disable-securetransport
+ )
+diff --git a/tools/depends/target/ffmpeg/FFMPEG-VERSION b/tools/depends/target/ffmpeg/FFMPEG-VERSION
+index f2ba09402e..60b8887de3 100644
+--- a/tools/depends/target/ffmpeg/FFMPEG-VERSION
++++ b/tools/depends/target/ffmpeg/FFMPEG-VERSION
+@@ -1,5 +1,5 @@
+ LIBNAME=ffmpeg
+-VERSION=6.0.1
++VERSION=7.0.1
+ ARCHIVE=$(LIBNAME)-$(VERSION).tar.gz
+-SHA512=945e34840092dc0fd3824eb1af2be79868af2afb4fe13159b19a9bcfc464cc4d53243c13ff065199290e9393ddbf4b1c5c8abccf83a31a31d6c7490e499fd1fc
++SHA512=43b639b0bc0597e95dea2dce3e925f4b71ca8c4d9eadaef614941053e287f2d5c2e78d95413f0f7142da0f6ea1dbf443457e4fa1c2296cd8cf4081c185ed9c04
+
+diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEResampleFFMPEG.cpp b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEResampleFFMPEG.cpp
+index e897cbd3ea..6fce0af981 100644
+--- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEResampleFFMPEG.cpp
++++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEResampleFFMPEG.cpp
+@@ -66,51 +66,7 @@ bool CActiveAEResampleFFMPEG::Init(SampleConfig dstConfig, SampleConfig srcConfi
+ AVChannelLayout dstChLayout = {};
+ AVChannelLayout srcChLayout = {};
+
+- av_channel_layout_from_mask(&dstChLayout, m_dst_chan_layout);
+- av_channel_layout_from_mask(&srcChLayout, m_src_chan_layout);
+-
+- int ret = swr_alloc_set_opts2(&m_pContext, &dstChLayout, m_dst_fmt, m_dst_rate, &srcChLayout,
+- m_src_fmt, m_src_rate, 0, NULL);
+-
+- if (ret)
+- {
+- CLog::Log(LOGERROR, "CActiveAEResampleFFMPEG::Init - create context failed");
+- return false;
+- }
+-
+- if(quality == AE_QUALITY_HIGH)
+- {
+- av_opt_set_double(m_pContext, "cutoff", 1.0, 0);
+- av_opt_set_int(m_pContext,"filter_size", 256, 0);
+- }
+- else if(quality == AE_QUALITY_MID)
+- {
+- // 0.97 is default cutoff so use (1.0 - 0.97) / 2.0 + 0.97
+- av_opt_set_double(m_pContext, "cutoff", 0.985, 0);
+- av_opt_set_int(m_pContext,"filter_size", 64, 0);
+- }
+- else if(quality == AE_QUALITY_LOW)
+- {
+- av_opt_set_double(m_pContext, "cutoff", 0.97, 0);
+- av_opt_set_int(m_pContext,"filter_size", 32, 0);
+- }
+-
+- if (m_dst_fmt == AV_SAMPLE_FMT_S32 || m_dst_fmt == AV_SAMPLE_FMT_S32P)
+- {
+- av_opt_set_int(m_pContext, "output_sample_bits", m_dst_bits, 0);
+- }
+-
+- // tell resampler to clamp float values
+- // not required for sink stage (remapLayout == true)
+- if ((m_dst_fmt == AV_SAMPLE_FMT_FLT || m_dst_fmt == AV_SAMPLE_FMT_FLTP) &&
+- (m_src_fmt == AV_SAMPLE_FMT_FLT || m_src_fmt == AV_SAMPLE_FMT_FLTP) &&
+- !remapLayout && normalize)
+- {
+- av_opt_set_double(m_pContext, "rematrix_maxval", 1.0, 0);
+- }
+-
+- av_opt_set_double(m_pContext, "center_mix_level", centerMix, 0);
+-
++ bool hasMatrix = false;
+ if (remapLayout)
+ {
+ // one-to-one mapping of channels
+@@ -120,28 +76,19 @@ bool CActiveAEResampleFFMPEG::Init(SampleConfig dstConfig, SampleConfig srcConfi
+ m_dst_chan_layout = 0;
+ for (unsigned int out=0; out<remapLayout->Count(); out++)
+ {
+- m_dst_chan_layout += ((uint64_t)1) << out;
++ m_dst_chan_layout += static_cast<uint64_t>(1) << out;
+ int idx = CAEUtil::GetAVChannelIndex((*remapLayout)[out], m_src_chan_layout);
+ if (idx >= 0)
+ {
+ m_rematrix[out][idx] = 1.0;
+ }
+ }
+-
+- av_opt_set_int(m_pContext, "out_channel_count", m_dst_channels, 0);
+- av_opt_set_int(m_pContext, "out_channel_layout", m_dst_chan_layout, 0);
+-
+- if (swr_set_matrix(m_pContext, (const double*)m_rematrix, AE_CH_MAX) < 0)
+- {
+- CLog::Log(LOGERROR, "CActiveAEResampleFFMPEG::Init - setting channel matrix failed");
+- return false;
+- }
++ hasMatrix = true;
+ }
+ // stereo upmix
+ else if (upmix && m_src_channels == 2 && m_dst_channels > 2)
+ {
+ memset(m_rematrix, 0, sizeof(m_rematrix));
+- av_channel_layout_uninit(&dstChLayout);
+ av_channel_layout_from_mask(&dstChLayout, m_dst_chan_layout);
+ for (int out=0; out<m_dst_channels; out++)
+ {
+@@ -171,15 +118,64 @@ bool CActiveAEResampleFFMPEG::Init(SampleConfig dstConfig, SampleConfig srcConfi
+ }
+ }
+
++ hasMatrix = true;
+ av_channel_layout_uninit(&dstChLayout);
++ }
++
++ av_channel_layout_from_mask(&dstChLayout, m_dst_chan_layout);
++ av_channel_layout_from_mask(&srcChLayout, m_src_chan_layout);
++
++ int ret = swr_alloc_set_opts2(&m_pContext, &dstChLayout, m_dst_fmt, m_dst_rate, &srcChLayout,
++ m_src_fmt, m_src_rate, 0, NULL);
++
++ if (ret)
++ {
++ CLog::Log(LOGERROR, "CActiveAEResampleFFMPEG::Init - create context failed");
++ return false;
++ }
+
+- if (swr_set_matrix(m_pContext, (const double*)m_rematrix, AE_CH_MAX) < 0)
++ if (hasMatrix)
++ {
++ if (swr_set_matrix(m_pContext, reinterpret_cast<const double*>(m_rematrix), AE_CH_MAX) < 0)
+ {
+ CLog::Log(LOGERROR, "CActiveAEResampleFFMPEG::Init - setting channel matrix failed");
+ return false;
+ }
+ }
+
++ if (quality == AE_QUALITY_HIGH)
++ {
++ av_opt_set_double(m_pContext, "cutoff", 1.0, 0);
++ av_opt_set_int(m_pContext, "filter_size", 256, 0);
++ }
++ else if (quality == AE_QUALITY_MID)
++ {
++ // 0.97 is default cutoff so use (1.0 - 0.97) / 2.0 + 0.97
++ av_opt_set_double(m_pContext, "cutoff", 0.985, 0);
++ av_opt_set_int(m_pContext, "filter_size", 64, 0);
++ }
++ else if (quality == AE_QUALITY_LOW)
++ {
++ av_opt_set_double(m_pContext, "cutoff", 0.97, 0);
++ av_opt_set_int(m_pContext, "filter_size", 32, 0);
++ }
++
++ if (m_dst_fmt == AV_SAMPLE_FMT_S32 || m_dst_fmt == AV_SAMPLE_FMT_S32P)
++ {
++ av_opt_set_int(m_pContext, "output_sample_bits", m_dst_bits, 0);
++ }
++
++ // tell resampler to clamp float values
++ // not required for sink stage (remapLayout == true)
++ if ((m_dst_fmt == AV_SAMPLE_FMT_FLT || m_dst_fmt == AV_SAMPLE_FMT_FLTP) &&
++ (m_src_fmt == AV_SAMPLE_FMT_FLT || m_src_fmt == AV_SAMPLE_FMT_FLTP) && !remapLayout &&
++ normalize)
++ {
++ av_opt_set_double(m_pContext, "rematrix_maxval", 1.0, 0);
++ }
++
++ av_opt_set_double(m_pContext, "center_mix_level", centerMix, 0);
++
+ if(swr_init(m_pContext) < 0)
+ {
+ CLog::Log(LOGERROR, "CActiveAEResampleFFMPEG::Init - init resampler failed");
+diff --git a/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxFFmpeg.cpp b/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
+index 1aebc3dcbc..174df53f16 100644
+--- a/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
++++ b/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
+@@ -376,74 +376,7 @@ bool CDVDDemuxFFmpeg::Open(const std::shared_ptr<CDVDInputStream>& pInput, bool
+ if (iformat == nullptr)
+ {
+ // let ffmpeg decide which demuxer we have to open
+- bool trySPDIFonly = (m_pInput->GetContent() == "audio/x-spdif-compressed");
+-
+- if (!trySPDIFonly)
+- av_probe_input_buffer(m_ioContext, &iformat, strFile.c_str(), NULL, 0, 0);
+-
+- // Use the more low-level code in case we have been built against an old
+- // FFmpeg without the above av_probe_input_buffer(), or in case we only
+- // want to probe for spdif (DTS or IEC 61937) compressed audio
+- // specifically, or in case the file is a wav which may contain DTS or
+- // IEC 61937 (e.g. ac3-in-wav) and we want to check for those formats.
+- if (trySPDIFonly || (iformat && strcmp(iformat->name, "wav") == 0))
+- {
+- AVProbeData pd;
+- int probeBufferSize = 32768;
+- std::unique_ptr<uint8_t[]> probe_buffer (new uint8_t[probeBufferSize + AVPROBE_PADDING_SIZE]);
+-
+- // init probe data
+- pd.buf = probe_buffer.get();
+- pd.filename = strFile.c_str();
+-
+- // read data using avformat's buffers
+- pd.buf_size = avio_read(m_ioContext, pd.buf, probeBufferSize);
+- if (pd.buf_size <= 0)
+- {
+- CLog::Log(LOGERROR, "{} - error reading from input stream, {}", __FUNCTION__,
+- CURL::GetRedacted(strFile));
+- return false;
+- }
+- memset(pd.buf + pd.buf_size, 0, AVPROBE_PADDING_SIZE);
+-
+- // restore position again
+- avio_seek(m_ioContext , 0, SEEK_SET);
+-
+- // the advancedsetting is for allowing the user to force outputting the
+- // 44.1 kHz DTS wav file as PCM, so that an A/V receiver can decode
+- // it (this is temporary until we handle 44.1 kHz passthrough properly)
+- if (trySPDIFonly || (iformat && strcmp(iformat->name, "wav") == 0 && !CServiceBroker::GetSettingsComponent()->GetAdvancedSettings()->m_VideoPlayerIgnoreDTSinWAV))
+- {
+- // check for spdif and dts
+- // This is used with wav files and audio CDs that may contain
+- // a DTS or AC3 track padded for S/PDIF playback. If neither of those
+- // is present, we assume it is PCM audio.
+- // AC3 is always wrapped in iec61937 (ffmpeg "spdif"), while DTS
+- // may be just padded.
+- const AVInputFormat* iformat2 = av_find_input_format("spdif");
+- if (iformat2 && iformat2->read_probe(&pd) > AVPROBE_SCORE_MAX / 4)
+- {
+- iformat = iformat2;
+- }
+- else
+- {
+- // not spdif or no spdif demuxer, try dts
+- iformat2 = av_find_input_format("dts");
+-
+- if (iformat2 && iformat2->read_probe(&pd) > AVPROBE_SCORE_MAX / 4)
+- {
+- iformat = iformat2;
+- }
+- else if (trySPDIFonly)
+- {
+- // not dts either, return false in case we were explicitly
+- // requested to only check for S/PDIF padded compressed audio
+- CLog::Log(LOGDEBUG, "{} - not spdif or dts file, falling back", __FUNCTION__);
+- return false;
+- }
+- }
+- }
+- }
++ av_probe_input_buffer(m_ioContext, &iformat, strFile.c_str(), NULL, 0, 0);
+
+ if (!iformat)
+ {
+@@ -1353,7 +1286,7 @@ bool CDVDDemuxFFmpeg::SeekTime(double time, bool backwards, double* startpts)
+
+ if (ret >= 0)
+ {
+- if (m_pFormatContext->iformat->read_seek)
++ if (!(m_pFormatContext->iformat->flags & AVFMT_NOTIMESTAMPS))
+ m_seekToKeyFrame = true;
+ m_currentPts = DVD_NOPTS_VALUE;
+ }
+--
+2.47.3
+
diff --git a/package/kodi/0008-Remove-deprecated-use-of-FF_API_INTERLACED_FRAME.patch b/package/kodi/0008-Remove-deprecated-use-of-FF_API_INTERLACED_FRAME.patch
new file mode 100644
index 0000000000..401681fcbe
--- /dev/null
+++ b/package/kodi/0008-Remove-deprecated-use-of-FF_API_INTERLACED_FRAME.patch
@@ -0,0 +1,98 @@
+From 8ab7d9781db412374796d80966828f35037d995c Mon Sep 17 00:00:00 2001
+From: Stephan Sundermann <stephansundermann@gmail.com>
+Date: Thu, 11 Apr 2024 17:13:36 +0200
+Subject: [PATCH] Remove deprecated use of FF_API_INTERLACED_FRAME
+
+Upstream: https://github.com/xbmc/xbmc/pull/24972#event-12966390666
+
+Patch was cherry-picked from upstream tree:
+https://github.com/xbmc/xbmc/commits/0e935f9edb30fd905f14230af653930b5fe139e8/
+
+Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
+---
+ .../DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp | 5 +++--
+ .../VideoPlayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp | 9 +++++----
+ xbmc/cores/VideoPlayer/DVDCodecs/Video/VAAPI.cpp | 6 ++++--
+ xbmc/cores/VideoPlayer/DVDCodecs/Video/VTB.cpp | 2 +-
+ 4 files changed, 13 insertions(+), 9 deletions(-)
+
+diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
+index eb2943bb8c..4da0722d5c 100644
+--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
++++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
+@@ -582,8 +582,9 @@ void CDVDVideoCodecDRMPRIME::SetPictureParams(VideoPicture* pVideoPicture)
+
+ pVideoPicture->iRepeatPicture = 0;
+ pVideoPicture->iFlags = 0;
+- pVideoPicture->iFlags |= m_pFrame->interlaced_frame ? DVP_FLAG_INTERLACED : 0;
+- pVideoPicture->iFlags |= m_pFrame->top_field_first ? DVP_FLAG_TOP_FIELD_FIRST : 0;
++ pVideoPicture->iFlags |= m_pFrame->flags & AV_FRAME_FLAG_INTERLACED ? DVP_FLAG_INTERLACED : 0;
++ pVideoPicture->iFlags |=
++ m_pFrame->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST ? DVP_FLAG_TOP_FIELD_FIRST : 0;
+ pVideoPicture->iFlags |= m_pFrame->data[0] ? 0 : DVP_FLAG_DROPPED;
+
+ if (m_codecControlFlags & DVD_CODEC_CTRL_DROP)
+diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
+index d66378fa07..9586d211e9 100644
+--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
++++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
+@@ -792,12 +792,12 @@ CDVDVideoCodec::VCReturn CDVDVideoCodecFFmpeg::GetPicture(VideoPicture* pVideoPi
+ }
+ m_dropCtrl.Process(framePTS, m_pCodecContext->skip_frame > AVDISCARD_DEFAULT);
+
+- if (m_pDecodedFrame->key_frame)
++ if (m_pDecodedFrame->flags & AV_FRAME_FLAG_KEY)
+ {
+ m_started = true;
+ m_iLastKeyframe = m_pCodecContext->has_b_frames + 2;
+ }
+- if (m_pDecodedFrame->interlaced_frame)
++ if (m_pDecodedFrame->flags & AV_FRAME_FLAG_INTERLACED)
+ m_interlaced = true;
+ else
+ m_interlaced = false;
+@@ -1013,8 +1013,9 @@ bool CDVDVideoCodecFFmpeg::GetPictureCommon(VideoPicture* pVideoPicture)
+
+ pVideoPicture->iRepeatPicture = 0.5 * m_pFrame->repeat_pict;
+ pVideoPicture->iFlags = 0;
+- pVideoPicture->iFlags |= m_pFrame->interlaced_frame ? DVP_FLAG_INTERLACED : 0;
+- pVideoPicture->iFlags |= m_pFrame->top_field_first ? DVP_FLAG_TOP_FIELD_FIRST: 0;
++ pVideoPicture->iFlags |= m_pFrame->flags & AV_FRAME_FLAG_INTERLACED ? DVP_FLAG_INTERLACED : 0;
++ pVideoPicture->iFlags |=
++ m_pFrame->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST ? DVP_FLAG_TOP_FIELD_FIRST : 0;
+
+ if (m_codecControlFlags & DVD_CODEC_CTRL_DROP)
+ {
+diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/VAAPI.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/VAAPI.cpp
+index fb7606e0d0..a62fa6273d 100644
+--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/VAAPI.cpp
++++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/VAAPI.cpp
+@@ -3068,8 +3068,10 @@ bool CFFmpegPostproc::AddPicture(CVaapiDecodedPicture &inPic)
+ m_pFilterFrameIn->height = m_config.vidHeight;
+ m_pFilterFrameIn->linesize[0] = image.pitches[0];
+ m_pFilterFrameIn->linesize[1] = image.pitches[1];
+- m_pFilterFrameIn->interlaced_frame = (inPic.DVDPic.iFlags & DVP_FLAG_INTERLACED) ? 1 : 0;
+- m_pFilterFrameIn->top_field_first = (inPic.DVDPic.iFlags & DVP_FLAG_TOP_FIELD_FIRST) ? 1 : 0;
++ if (inPic.DVDPic.iFlags & DVP_FLAG_INTERLACED)
++ m_pFilterFrameIn->flags |= AV_FRAME_FLAG_INTERLACED;
++ if (inPic.DVDPic.iFlags & DVP_FLAG_TOP_FIELD_FIRST)
++ m_pFilterFrameIn->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST;
+
+ if (inPic.DVDPic.pts == DVD_NOPTS_VALUE)
+ m_pFilterFrameIn->pts = AV_NOPTS_VALUE;
+diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/VTB.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/VTB.cpp
+index 1f71f643d2..567d63559d 100644
+--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/VTB.cpp
++++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/VTB.cpp
+@@ -196,7 +196,7 @@ CDVDVideoCodec::VCReturn CDecoder::Decode(AVCodecContext* avctx, AVFrame* frame)
+
+ if(frame)
+ {
+- if (frame->interlaced_frame)
++ if (frame->flags & AV_FRAME_FLAG_INTERLACED)
+ return CDVDVideoCodec::VC_FATAL;
+
+ if (m_renderBuffer)
+--
+2.47.3
+
diff --git a/package/kodi/0009-Remove-deprecated-use-of-avcodec_close.patch b/package/kodi/0009-Remove-deprecated-use-of-avcodec_close.patch
new file mode 100644
index 0000000000..97b957c001
--- /dev/null
+++ b/package/kodi/0009-Remove-deprecated-use-of-avcodec_close.patch
@@ -0,0 +1,30 @@
+From 31bcf3a0c4b041ca04f710c5cf731b2ab8fe3ae0 Mon Sep 17 00:00:00 2001
+From: Stephan Sundermann <stephansundermann@gmail.com>
+Date: Thu, 11 Apr 2024 17:14:48 +0200
+Subject: [PATCH] Remove deprecated use of avcodec_close
+
+Upstream: https://github.com/xbmc/xbmc/pull/24972#event-12966390666
+
+Patch was cherry-picked from upstream tree:
+https://github.com/xbmc/xbmc/commits/0e935f9edb30fd905f14230af653930b5fe139e8/
+
+Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
+---
+ xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxClient.cpp | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxClient.cpp b/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxClient.cpp
+index 0cdf8c3864..477a2e82ec 100644
+--- a/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxClient.cpp
++++ b/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxClient.cpp
+@@ -188,7 +188,6 @@ bool CDVDDemuxClient::ParsePacket(DemuxPacket* pkt)
+ if (!avcodec_open2(stream->m_context, stream->m_context->codec, nullptr))
+ {
+ avcodec_send_packet(stream->m_context, avpkt);
+- avcodec_close(stream->m_context);
+ }
+ }
+ av_packet_free(&avpkt);
+--
+2.47.3
+
diff --git a/package/kodi/0010-Remove-deprecated-use-av_stream_get_side_data.patch b/package/kodi/0010-Remove-deprecated-use-av_stream_get_side_data.patch
new file mode 100644
index 0000000000..ce8a37e200
--- /dev/null
+++ b/package/kodi/0010-Remove-deprecated-use-av_stream_get_side_data.patch
@@ -0,0 +1,113 @@
+From c1ef1c6851c01f8435b66eb7b605feae83089f28 Mon Sep 17 00:00:00 2001
+From: Stephan Sundermann <stephansundermann@gmail.com>
+Date: Thu, 11 Apr 2024 17:15:16 +0200
+Subject: [PATCH] Remove deprecated use av_stream_get_side_data
+
+Upstream: https://github.com/xbmc/xbmc/pull/24972#event-12966390666
+
+Patch was cherry-picked from upstream tree:
+https://github.com/xbmc/xbmc/commits/0e935f9edb30fd905f14230af653930b5fe139e8/
+
+Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
+---
+ .../DVDDemuxers/DVDDemuxFFmpeg.cpp | 53 +++++++++++--------
+ 1 file changed, 32 insertions(+), 21 deletions(-)
+
+diff --git a/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxFFmpeg.cpp b/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
+index 174df53f16..f917bf719f 100644
+--- a/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
++++ b/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
+@@ -1630,42 +1630,49 @@ CDemuxStream* CDVDDemuxFFmpeg::AddStream(int streamIdx)
+ st->colorRange = pStream->codecpar->color_range;
+ st->hdr_type = DetermineHdrType(pStream);
+
+- // https://github.com/FFmpeg/FFmpeg/blob/release/5.0/doc/APIchanges
+- size_t size = 0;
+- uint8_t* side_data = nullptr;
++ // https://github.com/FFmpeg/FFmpeg/blob/release/7.0/doc/APIchanges
++ const AVPacketSideData* sideData = nullptr;
+
+ if (st->hdr_type == StreamHdrType::HDR_TYPE_DOLBYVISION)
+ {
+- side_data = av_stream_get_side_data(pStream, AV_PKT_DATA_DOVI_CONF, &size);
+- if (side_data && size)
++
++ sideData =
++ av_packet_side_data_get(pStream->codecpar->coded_side_data,
++ pStream->codecpar->nb_coded_side_data, AV_PKT_DATA_DOVI_CONF);
++ if (sideData && sideData->size)
+ {
+- st->dovi = *reinterpret_cast<AVDOVIDecoderConfigurationRecord*>(side_data);
++ st->dovi = *reinterpret_cast<const AVDOVIDecoderConfigurationRecord*>(sideData->data);
+ }
+ }
+
+- side_data = av_stream_get_side_data(pStream, AV_PKT_DATA_MASTERING_DISPLAY_METADATA, &size);
+- if (side_data && size)
++ sideData = av_packet_side_data_get(pStream->codecpar->coded_side_data,
++ pStream->codecpar->nb_coded_side_data,
++ AV_PKT_DATA_MASTERING_DISPLAY_METADATA);
++ if (sideData && sideData->size)
+ {
+ st->masteringMetaData = std::make_shared<AVMasteringDisplayMetadata>(
+- *reinterpret_cast<AVMasteringDisplayMetadata*>(side_data));
++ *reinterpret_cast<const AVMasteringDisplayMetadata*>(sideData->data));
+ }
+
+- side_data = av_stream_get_side_data(pStream, AV_PKT_DATA_CONTENT_LIGHT_LEVEL, &size);
+- if (side_data && size)
++ sideData = av_packet_side_data_get(pStream->codecpar->coded_side_data,
++ pStream->codecpar->nb_coded_side_data,
++ AV_PKT_DATA_CONTENT_LIGHT_LEVEL);
++ if (sideData && sideData->size)
+ {
+ st->contentLightMetaData = std::make_shared<AVContentLightMetadata>(
+- *reinterpret_cast<AVContentLightMetadata*>(side_data));
++ *reinterpret_cast<const AVContentLightMetadata*>(sideData->data));
+ }
+
+- uint8_t* displayMatrixSideData =
+- av_stream_get_side_data(pStream, AV_PKT_DATA_DISPLAYMATRIX, nullptr);
+- if (displayMatrixSideData)
++ sideData = av_packet_side_data_get(pStream->codecpar->coded_side_data,
++ pStream->codecpar->nb_coded_side_data,
++ AV_PKT_DATA_DISPLAYMATRIX);
++ if (sideData)
+ {
+- const double tetha =
+- av_display_rotation_get(reinterpret_cast<int32_t*>(displayMatrixSideData));
+- if (!std::isnan(tetha))
++ const double theta =
++ av_display_rotation_get(reinterpret_cast<const int32_t*>(sideData->data));
++ if (!std::isnan(theta))
+ {
+- st->iOrientation = ((static_cast<int>(-tetha) % 360) + 360) % 360;
++ st->iOrientation = ((static_cast<int>(-theta) % 360) + 360) % 360;
+ }
+ }
+
+@@ -2488,7 +2495,9 @@ StreamHdrType CDVDDemuxFFmpeg::DetermineHdrType(AVStream* pStream)
+ {
+ StreamHdrType hdrType = StreamHdrType::HDR_TYPE_NONE;
+
+- if (av_stream_get_side_data(pStream, AV_PKT_DATA_DOVI_CONF, nullptr)) // DoVi
++ if (av_packet_side_data_get(pStream->codecpar->coded_side_data,
++ pStream->codecpar->nb_coded_side_data,
++ AV_PKT_DATA_DOVI_CONF)) // DoVi
+ hdrType = StreamHdrType::HDR_TYPE_DOLBYVISION;
+ else if (pStream->codecpar->color_trc == AVCOL_TRC_SMPTE2084) // HDR10
+ hdrType = StreamHdrType::HDR_TYPE_HDR10;
+@@ -2496,7 +2505,9 @@ StreamHdrType CDVDDemuxFFmpeg::DetermineHdrType(AVStream* pStream)
+ hdrType = StreamHdrType::HDR_TYPE_HLG;
+ // file could be SMPTE2086 which FFmpeg currently returns as unknown
+ // so use the presence of static metadata to detect it
+- else if (av_stream_get_side_data(pStream, AV_PKT_DATA_MASTERING_DISPLAY_METADATA, nullptr))
++ else if (av_packet_side_data_get(pStream->codecpar->coded_side_data,
++ pStream->codecpar->nb_coded_side_data,
++ AV_PKT_DATA_MASTERING_DISPLAY_METADATA))
+ hdrType = StreamHdrType::HDR_TYPE_HDR10;
+
+ return hdrType;
+--
+2.47.3
+
diff --git a/package/kodi/0011-Remove-CrystalHD-hw-acceleration-strings.patch b/package/kodi/0011-Remove-CrystalHD-hw-acceleration-strings.patch
new file mode 100644
index 0000000000..583bd1dbd5
--- /dev/null
+++ b/package/kodi/0011-Remove-CrystalHD-hw-acceleration-strings.patch
@@ -0,0 +1,47 @@
+From a186fedb05fa90ffa2c0a97115f756a213631575 Mon Sep 17 00:00:00 2001
+From: Stephan Sundermann <stephansundermann@gmail.com>
+Date: Thu, 11 Apr 2024 17:15:43 +0200
+Subject: [PATCH] Remove CrystalHD hw acceleration strings
+
+Upstream: https://github.com/xbmc/xbmc/pull/24972#event-12966390666
+
+Patch was cherry-picked from upstream tree:
+https://github.com/xbmc/xbmc/commits/0e935f9edb30fd905f14230af653930b5fe139e8/
+
+Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
+---
+ addons/resource.language.en_gb/resources/strings.po | 11 ++---------
+ 1 file changed, 2 insertions(+), 9 deletions(-)
+
+diff --git a/addons/resource.language.en_gb/resources/strings.po b/addons/resource.language.en_gb/resources/strings.po
+index 98eb7f64b7..b9a680fd93 100644
+--- a/addons/resource.language.en_gb/resources/strings.po
++++ b/addons/resource.language.en_gb/resources/strings.po
+@@ -7359,10 +7359,7 @@ msgctxt "#13427"
+ msgid "Allow hardware acceleration - DXVA2"
+ msgstr ""
+
+-#: system/settings/settings.xml
+-msgctxt "#13428"
+-msgid "Allow hardware acceleration - CrystalHD"
+-msgstr ""
++#empty string with id 13428
+
+ #: system/settings/settings.xml
+ msgctxt "#13429"
+@@ -19518,11 +19515,7 @@ msgctxt "#36158"
+ msgid "Enable DXVA2 hardware decoding of video files."
+ msgstr ""
+
+-#. Description of setting with label #13428 "Allow hardware acceleration (CrystalHD)"
+-#: system/settings/settings.xml
+-msgctxt "#36159"
+-msgid "Enable CrystalHD decoding of video files."
+-msgstr ""
++#empty string with id 36159
+
+ #. Description of setting with label #13429 "Allow hardware acceleration (VDADecoder)"
+ #: system/settings/settings.xml
+--
+2.47.3
+
diff --git a/package/kodi/0012-Remove-VideoPlayerignoredtsinwav-advanced-setting.patch b/package/kodi/0012-Remove-VideoPlayerignoredtsinwav-advanced-setting.patch
new file mode 100644
index 0000000000..9dec6ae8cf
--- /dev/null
+++ b/package/kodi/0012-Remove-VideoPlayerignoredtsinwav-advanced-setting.patch
@@ -0,0 +1,51 @@
+From 463dd7fdc97fdfbe93b1145b6fd8e5bfaceaaa0c Mon Sep 17 00:00:00 2001
+From: Stephan Sundermann <stephansundermann@gmail.com>
+Date: Sat, 13 Apr 2024 10:31:36 +0200
+Subject: [PATCH] Remove VideoPlayerignoredtsinwav advanced setting
+
+Upstream: https://github.com/xbmc/xbmc/pull/24972#event-12966390666
+
+Patch was cherry-picked from upstream tree:
+https://github.com/xbmc/xbmc/commits/0e935f9edb30fd905f14230af653930b5fe139e8/
+
+Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
+---
+ xbmc/settings/AdvancedSettings.cpp | 2 --
+ xbmc/settings/AdvancedSettings.h | 1 -
+ 2 files changed, 3 deletions(-)
+
+diff --git a/xbmc/settings/AdvancedSettings.cpp b/xbmc/settings/AdvancedSettings.cpp
+index cc06244799..4e2d6badd6 100644
+--- a/xbmc/settings/AdvancedSettings.cpp
++++ b/xbmc/settings/AdvancedSettings.cpp
+@@ -129,7 +129,6 @@ void CAdvancedSettings::Initialize()
+ return;
+
+ m_audioApplyDrc = -1.0f;
+- m_VideoPlayerIgnoreDTSinWAV = false;
+
+ //default hold time of 25 ms, this allows a 20 hertz sine to pass undistorted
+ m_limiterHold = 0.025f;
+@@ -579,7 +578,6 @@ void CAdvancedSettings::ParseSettingsFile(const std::string &file)
+ GetCustomRegexps(pAudioExcludes, m_audioExcludeFromScanRegExps);
+
+ XMLUtils::GetFloat(pElement, "applydrc", m_audioApplyDrc);
+- XMLUtils::GetBoolean(pElement, "VideoPlayerignoredtsinwav", m_VideoPlayerIgnoreDTSinWAV);
+
+ XMLUtils::GetFloat(pElement, "limiterhold", m_limiterHold, 0.0f, 100.0f);
+ XMLUtils::GetFloat(pElement, "limiterrelease", m_limiterRelease, 0.001f, 100.0f);
+diff --git a/xbmc/settings/AdvancedSettings.h b/xbmc/settings/AdvancedSettings.h
+index 5abbed2486..a0bc209dce 100644
+--- a/xbmc/settings/AdvancedSettings.h
++++ b/xbmc/settings/AdvancedSettings.h
+@@ -121,7 +121,6 @@ class CAdvancedSettings : public ISettingCallback, public ISettingsHandler
+
+ std::string m_audioDefaultPlayer;
+ float m_audioPlayCountMinimumPercent;
+- bool m_VideoPlayerIgnoreDTSinWAV;
+ float m_limiterHold;
+ float m_limiterRelease;
+
+--
+2.47.3
+
diff --git a/package/kodi/0013-Use-new-audio-DTS-and-ATMOS-profiles.patch b/package/kodi/0013-Use-new-audio-DTS-and-ATMOS-profiles.patch
new file mode 100644
index 0000000000..be3abbed20
--- /dev/null
+++ b/package/kodi/0013-Use-new-audio-DTS-and-ATMOS-profiles.patch
@@ -0,0 +1,98 @@
+From a088ac3ab28e55a5fa7f3de13ab9c59cbb1f9601 Mon Sep 17 00:00:00 2001
+From: Stephan Sundermann <stephansundermann@gmail.com>
+Date: Sat, 13 Apr 2024 13:07:58 +0200
+Subject: [PATCH] Use new audio DTS and ATMOS profiles
+
+Upstream: https://github.com/xbmc/xbmc/pull/24972#event-12966390666
+
+Patch was cherry-picked from upstream tree:
+https://github.com/xbmc/xbmc/commits/0e935f9edb30fd905f14230af653930b5fe139e8/
+
+Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
+---
+ .../VideoPlayer/DVDDemuxers/DVDDemux.cpp | 20 +++++++++++++------
+ .../DVDInputStreams/InputStreamAddon.cpp | 9 +++------
+ 2 files changed, 17 insertions(+), 12 deletions(-)
+
+diff --git a/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemux.cpp b/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemux.cpp
+index 63fb9264a8..22fe7ba751 100644
+--- a/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemux.cpp
++++ b/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemux.cpp
+@@ -15,15 +15,15 @@ std::string CDemuxStreamAudio::GetStreamType()
+ std::string strInfo;
+ switch (codec)
+ {
+- //! @todo: With ffmpeg >= 6.1 add new AC4 codec
+ case AV_CODEC_ID_AC3:
+ strInfo = "AC3 ";
+ break;
++ case AV_CODEC_ID_AC4:
++ strInfo = "AC4 ";
++ break;
+ case AV_CODEC_ID_EAC3:
+ {
+- //! @todo: With ffmpeg >= 6.1 add new atmos profile case
+- // "JOC" its EAC3 Atmos underlying profile, there is no standard codec name string
+- if (StringUtils::Contains(codecName, "JOC"))
++ if (profile == FF_PROFILE_EAC3_DDP_ATMOS)
+ strInfo = "DD+ ATMOS ";
+ else
+ strInfo = "DD+ ";
+@@ -31,7 +31,6 @@ std::string CDemuxStreamAudio::GetStreamType()
+ }
+ case AV_CODEC_ID_DTS:
+ {
+- //! @todo: With ffmpeg >= 6.1 add new DTSX profile cases
+ switch (profile)
+ {
+ case FF_PROFILE_DTS_96_24:
+@@ -49,6 +48,12 @@ std::string CDemuxStreamAudio::GetStreamType()
+ case FF_PROFILE_DTS_HD_HRA:
+ strInfo = "DTS-HD HRA ";
+ break;
++ case FF_PROFILE_DTS_HD_MA_X:
++ strInfo = "DTS-HD MA X ";
++ break;
++ case FF_PROFILE_DTS_HD_MA_X_IMAX:
++ strInfo = "DTS-HD MA X (IMAX) ";
++ break;
+ default:
+ strInfo = "DTS ";
+ break;
+@@ -62,7 +67,10 @@ std::string CDemuxStreamAudio::GetStreamType()
+ strInfo = "MP3 ";
+ break;
+ case AV_CODEC_ID_TRUEHD:
+- strInfo = "TrueHD ";
++ if (profile == FF_PROFILE_TRUEHD_ATMOS)
++ strInfo = "TrueHD ATMOS ";
++ else
++ strInfo = "TrueHD ";
+ break;
+ case AV_CODEC_ID_AAC:
+ {
+diff --git a/xbmc/cores/VideoPlayer/DVDInputStreams/InputStreamAddon.cpp b/xbmc/cores/VideoPlayer/DVDInputStreams/InputStreamAddon.cpp
+index daf66ce0cd..902f38ade2 100644
+--- a/xbmc/cores/VideoPlayer/DVDInputStreams/InputStreamAddon.cpp
++++ b/xbmc/cores/VideoPlayer/DVDInputStreams/InputStreamAddon.cpp
+@@ -762,14 +762,11 @@ int CInputStreamAddon::ConvertAudioCodecProfile(STREAMCODEC_PROFILE profile)
+ case DTSCodecProfileHDExpress:
+ return FF_PROFILE_DTS_EXPRESS;
+ case DTSCodecProfileHDMAX:
+- //! @todo: with ffmpeg >= 6.1 set the appropriate profile
+- return FF_PROFILE_UNKNOWN; // FF_PROFILE_DTS_HD_MA_X
++ return FF_PROFILE_DTS_HD_MA_X;
+ case DTSCodecProfileHDMAIMAX:
+- //! @todo: with ffmpeg >= 6.1 set the appropriate profile
+- return FF_PROFILE_UNKNOWN; // FF_PROFILE_DTS_HD_MA_X_IMAX
++ return FF_PROFILE_DTS_HD_MA_X_IMAX;
+ case DDPlusCodecProfileAtmos:
+- //! @todo: with ffmpeg >= 6.1 set the appropriate profile
+- return FF_PROFILE_UNKNOWN; // FF_PROFILE_EAC3_DDP_ATMOS
++ return FF_PROFILE_EAC3_DDP_ATMOS;
+ default:
+ return FF_PROFILE_UNKNOWN;
+ }
+--
+2.47.3
+
--
2.47.3
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 4/5] package/kodi-inputstream-ffmpegdirect: Fix build with ffmpeg-7.0
2026-10-13 21:50 [Buildroot] [PATCH 1/5] package/gerbera: fix build with ffmpeg 7.0 Bernd Kuhls
2026-10-13 21:50 ` [Buildroot] [PATCH 2/5] package/libcamera-apps: " Bernd Kuhls
2026-10-13 21:50 ` [Buildroot] [PATCH 3/5] package/kodi: support " Bernd Kuhls
@ 2026-10-13 21:50 ` Bernd Kuhls
2026-10-13 21:50 ` [Buildroot] [PATCH 5/5] package/ffmpeg: bump version to 7.0.3 Bernd Kuhls
2026-10-18 20:04 ` [Buildroot] [PATCH 1/5] package/gerbera: fix build with ffmpeg 7.0 Thomas Petazzoni via buildroot
4 siblings, 0 replies; 6+ messages in thread
From: Bernd Kuhls @ 2026-10-13 21:50 UTC (permalink / raw)
To: buildroot
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
.../0001-Update-to-7.1.patch | 106 ++++++++++++++++++
1 file changed, 106 insertions(+)
create mode 100644 package/kodi-inputstream-ffmpegdirect/0001-Update-to-7.1.patch
diff --git a/package/kodi-inputstream-ffmpegdirect/0001-Update-to-7.1.patch b/package/kodi-inputstream-ffmpegdirect/0001-Update-to-7.1.patch
new file mode 100644
index 0000000000..a82b9a5ee8
--- /dev/null
+++ b/package/kodi-inputstream-ffmpegdirect/0001-Update-to-7.1.patch
@@ -0,0 +1,106 @@
+From c7272c63151921bf4b63792cd2c9afc73fe5d666 Mon Sep 17 00:00:00 2001
+From: Stephan Sundermann <stephansundermann@gmail.com>
+Date: Thu, 11 Apr 2024 17:11:32 +0200
+Subject: [PATCH] Update to 7.1
+
+Upstream: https://github.com/xbmc/xbmc/commit/72fe098c8436c96763f677b4c65d32988b931b5b
+
+[Bernd: ported xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
+ fix to kodi-inputstream-ffmpegdirect 21.3.8-Omega]
+Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
+---
+ src/stream/FFmpegStream.cpp | 71 ++-----------------------------------
+ 1 file changed, 2 insertions(+), 69 deletions(-)
+
+diff --git a/src/stream/FFmpegStream.cpp b/src/stream/FFmpegStream.cpp
+index 8bf474f..649e43e 100644
+--- a/src/stream/FFmpegStream.cpp
++++ b/src/stream/FFmpegStream.cpp
+@@ -1012,74 +1012,7 @@ bool FFmpegStream::OpenWithCURL(const AVInputFormat* iformat)
+ if (iformat == nullptr)
+ {
+ // let ffmpeg decide which demuxer we have to open
+- bool trySPDIFonly = (m_curlInput->GetContent() == "audio/x-spdif-compressed");
+-
+- if (!trySPDIFonly)
+- av_probe_input_buffer(m_ioContext, &iformat, strFile.c_str(), NULL, 0, 0);
+-
+- // Use the more low-level code in case we have been built against an old
+- // FFmpeg without the above av_probe_input_buffer(), or in case we only
+- // want to probe for spdif (DTS or IEC 61937) compressed audio
+- // specifically, or in case the file is a wav which may contain DTS or
+- // IEC 61937 (e.g. ac3-in-wav) and we want to check for those formats.
+- if (trySPDIFonly || (iformat && strcmp(iformat->name, "wav") == 0))
+- {
+- AVProbeData pd;
+- int probeBufferSize = 32768;
+- std::unique_ptr<uint8_t[]> probe_buffer (new uint8_t[probeBufferSize + AVPROBE_PADDING_SIZE]);
+-
+- // init probe data
+- pd.buf = probe_buffer.get();
+- pd.filename = strFile.c_str();
+-
+- // read data using avformat's buffers
+- pd.buf_size = avio_read(m_ioContext, pd.buf, probeBufferSize);
+- if (pd.buf_size <= 0)
+- {
+- Log(LOGLEVEL_ERROR, "%s - error reading from input stream, %s", __FUNCTION__, CURL::GetRedacted(strFile).c_str());
+- return false;
+- }
+- memset(pd.buf + pd.buf_size, 0, AVPROBE_PADDING_SIZE);
+-
+- // restore position again
+- avio_seek(m_ioContext , 0, SEEK_SET);
+-
+- // the advancedsetting is for allowing the user to force outputting the
+- // 44.1 kHz DTS wav file as PCM, so that an A/V receiver can decode
+- // it (this is temporary until we handle 44.1 kHz passthrough properly)
+- if (trySPDIFonly || (iformat && strcmp(iformat->name, "wav") == 0)) // && !CServiceBroker::GetSettingsComponent()->GetAdvancedSettings()->m_VideoPlayerIgnoreDTSinWAV))
+- {
+- // check for spdif and dts
+- // This is used with wav files and audio CDs that may contain
+- // a DTS or AC3 track padded for S/PDIF playback. If neither of those
+- // is present, we assume it is PCM audio.
+- // AC3 is always wrapped in iec61937 (ffmpeg "spdif"), while DTS
+- // may be just padded.
+- const AVInputFormat* iformat2 = av_find_input_format("spdif");
+-
+- if (iformat2 && iformat2->read_probe(&pd) > AVPROBE_SCORE_MAX / 4)
+- {
+- iformat = iformat2;
+- }
+- else
+- {
+- // not spdif or no spdif demuxer, try dts
+- iformat2 = av_find_input_format("dts");
+-
+- if (iformat2 && iformat2->read_probe(&pd) > AVPROBE_SCORE_MAX / 4)
+- {
+- iformat = iformat2;
+- }
+- else if (trySPDIFonly)
+- {
+- // not dts either, return false in case we were explicitly
+- // requested to only check for S/PDIF padded compressed audio
+- Log(LOGLEVEL_DEBUG, "%s - not spdif or dts file, falling back", __FUNCTION__);
+- return false;
+- }
+- }
+- }
+- }
++ av_probe_input_buffer(m_ioContext, &iformat, strFile.c_str(), NULL, 0, 0);
+
+ if (!iformat)
+ {
+@@ -1535,7 +1468,7 @@ bool FFmpegStream::SeekTime(double time, bool backwards, double* startpts)
+
+ if (ret >= 0)
+ {
+- if (m_pFormatContext->iformat->read_seek)
++ if (!(m_pFormatContext->iformat->flags & AVFMT_NOTIMESTAMPS))
+ m_seekToKeyFrame = true;
+
+ m_currentPts = STREAM_NOPTS_VALUE;
+--
+2.47.3
+
--
2.47.3
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 5/5] package/ffmpeg: bump version to 7.0.3
2026-10-13 21:50 [Buildroot] [PATCH 1/5] package/gerbera: fix build with ffmpeg 7.0 Bernd Kuhls
` (2 preceding siblings ...)
2026-10-13 21:50 ` [Buildroot] [PATCH 4/5] package/kodi-inputstream-ffmpegdirect: Fix build with ffmpeg-7.0 Bernd Kuhls
@ 2026-10-13 21:50 ` Bernd Kuhls
2026-10-18 20:04 ` [Buildroot] [PATCH 1/5] package/gerbera: fix build with ffmpeg 7.0 Thomas Petazzoni via buildroot
4 siblings, 0 replies; 6+ messages in thread
From: Bernd Kuhls @ 2026-10-13 21:50 UTC (permalink / raw)
To: buildroot; +Cc: Mahyar Koshkouei
Removed patches 0005, 0006 & 0007 which are included in this release.
Removed configure option --disable-crystalhd due to upstream removal:
http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=5b23b18d40ead8606c92d967279b3f43c94d8a60
Added fix for Kodi to fix a build error introduced by this bump, the
patch was split from the upstream PR because it is incompatible with
ffmpeg 6.1.
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Cc: Mahyar Koshkouei <mahyar.koshkouei@gmail.com>
---
...0005-avcodec-mmaldec-Fix-build-error.patch | 32 ------------
...ay-dvd-Use-correct-pointer-types-on-.patch | 52 -------------------
...hwcontext-vaapi-use-the-correct-type.patch | 28 ----------
package/ffmpeg/ffmpeg.hash | 2 +-
package/ffmpeg/ffmpeg.mk | 3 +-
package/kodi/0014-Update-to-7.0.patch | 47 +++++++++++++++++
6 files changed, 49 insertions(+), 115 deletions(-)
delete mode 100644 package/ffmpeg/0005-avcodec-mmaldec-Fix-build-error.patch
delete mode 100644 package/ffmpeg/0006-avcodec-pcm-bluray-dvd-Use-correct-pointer-types-on-.patch
delete mode 100644 package/ffmpeg/0007-avutil-hwcontext-vaapi-use-the-correct-type.patch
create mode 100644 package/kodi/0014-Update-to-7.0.patch
diff --git a/package/ffmpeg/0005-avcodec-mmaldec-Fix-build-error.patch b/package/ffmpeg/0005-avcodec-mmaldec-Fix-build-error.patch
deleted file mode 100644
index b3b901264f..0000000000
--- a/package/ffmpeg/0005-avcodec-mmaldec-Fix-build-error.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From e8a49b1424d405441fb23c2850274a84e95bd892 Mon Sep 17 00:00:00 2001
-From: Zhao Zhili <zhilizhao@tencent.com>
-Date: Tue, 21 Nov 2023 04:05:08 +0800
-Subject: [PATCH] avcodec/mmaldec: Fix build error
-
-Fix #10670.
-
-Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
-
-Upstream: http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=e8a49b1424d405441fb23c2850274a84e95bd892
-
-Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
----
- libavcodec/mmaldec.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libavcodec/mmaldec.c b/libavcodec/mmaldec.c
-index 4bb3eb22ef..2dc7bbee04 100644
---- a/libavcodec/mmaldec.c
-+++ b/libavcodec/mmaldec.c
-@@ -843,7 +843,7 @@ static const AVClass ffmmal_dec_class = {
- .flush = ffmmal_flush, \
- .p.priv_class = &ffmmal_dec_class, \
- .p.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HARDWARE, \
-- .caps_internal = FF_CODEC_CAP_NOT_INIT_THREADSAFE \
-+ .caps_internal = FF_CODEC_CAP_NOT_INIT_THREADSAFE, \
- .p.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_MMAL, \
- AV_PIX_FMT_YUV420P, \
- AV_PIX_FMT_NONE}, \
---
-2.30.2
-
diff --git a/package/ffmpeg/0006-avcodec-pcm-bluray-dvd-Use-correct-pointer-types-on-.patch b/package/ffmpeg/0006-avcodec-pcm-bluray-dvd-Use-correct-pointer-types-on-.patch
deleted file mode 100644
index a77a0cf5ec..0000000000
--- a/package/ffmpeg/0006-avcodec-pcm-bluray-dvd-Use-correct-pointer-types-on-.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 347a70f101be28f8d78e8fd62ffc3a78324f49e9 Mon Sep 17 00:00:00 2001
-From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-Date: Thu, 28 Mar 2024 05:35:36 +0100
-Subject: [PATCH] avcodec/pcm-bluray/dvd: Use correct pointer types on BE
-
-Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
-Upstream: https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/347a70f101be28f8d78e8fd62ffc3a78324f49e9
----
- libavcodec/pcm-bluray.c | 5 +++--
- libavcodec/pcm-dvd.c | 2 +-
- 2 files changed, 4 insertions(+), 3 deletions(-)
-
-diff --git a/libavcodec/pcm-bluray.c b/libavcodec/pcm-bluray.c
-index f65609514a..235020d78f 100644
---- a/libavcodec/pcm-bluray.c
-+++ b/libavcodec/pcm-bluray.c
-@@ -167,7 +167,7 @@ static int pcm_bluray_decode_frame(AVCodecContext *avctx, AVFrame *frame,
- samples *= num_source_channels;
- if (AV_SAMPLE_FMT_S16 == avctx->sample_fmt) {
- #if HAVE_BIGENDIAN
-- bytestream2_get_buffer(&gb, dst16, buf_size);
-+ bytestream2_get_buffer(&gb, (uint8_t*)dst16, buf_size);
- #else
- do {
- *dst16++ = bytestream2_get_be16u(&gb);
-@@ -187,7 +187,8 @@ static int pcm_bluray_decode_frame(AVCodecContext *avctx, AVFrame *frame,
- if (AV_SAMPLE_FMT_S16 == avctx->sample_fmt) {
- do {
- #if HAVE_BIGENDIAN
-- bytestream2_get_buffer(&gb, dst16, avctx->ch_layout.nb_channels * 2);
-+ bytestream2_get_buffer(&gb, (uint8_t*)dst16,
-+ avctx->ch_layout.nb_channels * 2);
- dst16 += avctx->ch_layout.nb_channels;
- #else
- channel = avctx->ch_layout.nb_channels;
-diff --git a/libavcodec/pcm-dvd.c b/libavcodec/pcm-dvd.c
-index 419b2a138f..319746c62e 100644
---- a/libavcodec/pcm-dvd.c
-+++ b/libavcodec/pcm-dvd.c
-@@ -157,7 +157,7 @@ static void *pcm_dvd_decode_samples(AVCodecContext *avctx, const uint8_t *src,
- switch (avctx->bits_per_coded_sample) {
- case 16: {
- #if HAVE_BIGENDIAN
-- bytestream2_get_buffer(&gb, dst16, blocks * s->block_size);
-+ bytestream2_get_buffer(&gb, (uint8_t*)dst16, blocks * s->block_size);
- dst16 += blocks * s->block_size / 2;
- #else
- int samples = blocks * avctx->ch_layout.nb_channels;
---
-2.39.2
-
diff --git a/package/ffmpeg/0007-avutil-hwcontext-vaapi-use-the-correct-type.patch b/package/ffmpeg/0007-avutil-hwcontext-vaapi-use-the-correct-type.patch
deleted file mode 100644
index 177b4f1885..0000000000
--- a/package/ffmpeg/0007-avutil-hwcontext-vaapi-use-the-correct-type.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 6f8e365a2af2b6b21701d41eed3b2e3f8a436eeb Mon Sep 17 00:00:00 2001
-From: James Almer <jamrial@gmail.com>
-Date: Wed, 31 Jul 2024 10:00:54 -0300
-Subject: [PATCH] avutil/hwcontext_vaapi: use the correct type for
- VASurfaceAttribExternalBuffers.buffers
-
-Should fix ticket #11115.
-
-Signed-off-by: James Almer <jamrial@gmail.com>
-Upstream: https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/6f8e365a2af2b6b21701d41eed3b2e3f8a436eeb
-Signed-off-by: Thomas Perale <thomas.perale@mind.be>
----
- libavutil/hwcontext_vaapi.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libavutil/hwcontext_vaapi.c b/libavutil/hwcontext_vaapi.c
-index 4cb25dd03212e..15fd84aa40679 100644
---- a/libavutil/hwcontext_vaapi.c
-+++ b/libavutil/hwcontext_vaapi.c
-@@ -1225,7 +1225,7 @@ static int vaapi_map_from_drm(AVHWFramesContext *src_fc, AVFrame *dst,
-
- if (!use_prime2 || vas != VA_STATUS_SUCCESS) {
- int k;
-- unsigned long buffer_handle;
-+ uintptr_t buffer_handle;
- VASurfaceAttribExternalBuffers buffer_desc;
- VASurfaceAttrib buffer_attrs[2] = {
- {
diff --git a/package/ffmpeg/ffmpeg.hash b/package/ffmpeg/ffmpeg.hash
index 4c489f168c..429b11c3d0 100644
--- a/package/ffmpeg/ffmpeg.hash
+++ b/package/ffmpeg/ffmpeg.hash
@@ -1,5 +1,5 @@
# Locally calculated
-sha256 05fbe9db1f5452a3605bb1d9bf91da9d4bb08162891692e4f172b58c49109412 ffmpeg-6.1.5.tar.xz
+sha256 bbb18f3cc5c1c34b21cf176c0168c4d9aa97697542a97f60d491a58a814dea65 ffmpeg-7.0.3.tar.xz
sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING.GPLv2
sha256 246041b6ecf9bc32d718a62c57877c78b5eb397b6467e74ed7ae2626ab189c30 COPYING.LGPLv2.1
sha256 cb48bf09a11f5fb576cddb0431c8f5ed0a60157a9ec942adffc13907cbe083f2 LICENSE.md
diff --git a/package/ffmpeg/ffmpeg.mk b/package/ffmpeg/ffmpeg.mk
index 1289cd5e72..4ce129132d 100644
--- a/package/ffmpeg/ffmpeg.mk
+++ b/package/ffmpeg/ffmpeg.mk
@@ -4,7 +4,7 @@
#
################################################################################
-FFMPEG_VERSION = 6.1.5
+FFMPEG_VERSION = 7.0.3
FFMPEG_SOURCE = ffmpeg-$(FFMPEG_VERSION).tar.xz
FFMPEG_SITE = https://ffmpeg.org/releases
FFMPEG_INSTALL_STAGING = YES
@@ -32,7 +32,6 @@ FFMPEG_CONF_OPTS = \
--disable-gray \
--enable-swscale-alpha \
--disable-small \
- --disable-crystalhd \
--disable-dxva2 \
--enable-runtime-cpudetect \
--disable-hardcoded-tables \
diff --git a/package/kodi/0014-Update-to-7.0.patch b/package/kodi/0014-Update-to-7.0.patch
new file mode 100644
index 0000000000..48a0cc2126
--- /dev/null
+++ b/package/kodi/0014-Update-to-7.0.patch
@@ -0,0 +1,47 @@
+From 8efb3fbddf1af2503b28ed21ccb23255f5031821 Mon Sep 17 00:00:00 2001
+From: Stephan Sundermann <stephansundermann@gmail.com>
+Date: Thu, 11 Apr 2024 17:11:32 +0200
+Subject: [PATCH] Update to 7.0
+
+Upstream: https://github.com/xbmc/xbmc/pull/24972#event-12966390666
+
+Patch was cherry-picked from upstream tree:
+https://github.com/xbmc/xbmc/commits/0e935f9edb30fd905f14230af653930b5fe139e8/
+
+[Bernd: re-add fixes for xbmc/cdrip which are incompatible with
+ ffmpeg 6.1]
+Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
+---
+ xbmc/cdrip/EncoderFFmpeg.cpp | 2 +-
+ xbmc/cdrip/EncoderFFmpeg.h | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/xbmc/cdrip/EncoderFFmpeg.cpp b/xbmc/cdrip/EncoderFFmpeg.cpp
+index 85f5fa412e..907d2591dd 100644
+--- a/xbmc/cdrip/EncoderFFmpeg.cpp
++++ b/xbmc/cdrip/EncoderFFmpeg.cpp
+@@ -235,7 +235,7 @@ void CEncoderFFmpeg::SetTag(const std::string& tag, const std::string& value)
+ av_dict_set(&m_formatCtx->metadata, tag.c_str(), value.c_str(), 0);
+ }
+
+-int CEncoderFFmpeg::avio_write_callback(void* opaque, uint8_t* buf, int buf_size)
++int CEncoderFFmpeg::avio_write_callback(void* opaque, const uint8_t* buf, int buf_size)
+ {
+ CEncoderFFmpeg* enc = static_cast<CEncoderFFmpeg*>(opaque);
+ if (enc->Write(buf, buf_size) != buf_size)
+diff --git a/xbmc/cdrip/EncoderFFmpeg.h b/xbmc/cdrip/EncoderFFmpeg.h
+index 48471a4b10..4e9f0f5bbb 100644
+--- a/xbmc/cdrip/EncoderFFmpeg.h
++++ b/xbmc/cdrip/EncoderFFmpeg.h
+@@ -33,7 +33,7 @@ public:
+ bool Close() override;
+
+ private:
+- static int avio_write_callback(void* opaque, uint8_t* buf, int buf_size);
++ static int avio_write_callback(void* opaque, const uint8_t* buf, int buf_size);
+ static int64_t avio_seek_callback(void* opaque, int64_t offset, int whence);
+
+ void SetTag(const std::string& tag, const std::string& value);
+--
+2.47.3
+
--
2.47.3
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Buildroot] [PATCH 1/5] package/gerbera: fix build with ffmpeg 7.0
2026-10-13 21:50 [Buildroot] [PATCH 1/5] package/gerbera: fix build with ffmpeg 7.0 Bernd Kuhls
` (3 preceding siblings ...)
2026-10-13 21:50 ` [Buildroot] [PATCH 5/5] package/ffmpeg: bump version to 7.0.3 Bernd Kuhls
@ 2026-10-18 20:04 ` Thomas Petazzoni via buildroot
4 siblings, 0 replies; 6+ messages in thread
From: Thomas Petazzoni via buildroot @ 2026-10-18 20:04 UTC (permalink / raw)
To: Bernd Kuhls; +Cc: buildroot, Fabrice Fontaine
On Tue, Oct 13, 2026 at 11:50:25PM +0200, Bernd Kuhls wrote:
> Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
> Cc: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Entire series applied. I tested it using the following defconfig which
enables a good number of packages that use ffmpeg:
BR2_aarch64=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_AARCH64_GLIBC_STABLE=y
BR2_INIT_NONE=y
BR2_SYSTEM_BIN_SH_NONE=y
# BR2_PACKAGE_BUSYBOX is not set
BR2_PACKAGE_PIPEWIRE=y
BR2_PACKAGE_SQUEEZELITE=y
BR2_PACKAGE_VLC=y
BR2_PACKAGE_FREERDP=y
BR2_PACKAGE_AUBIO=y
BR2_PACKAGE_OPENCV4=y
BR2_PACKAGE_OPENCV4_WITH_FFMPEG=y
BR2_PACKAGE_LIBHEIF=y
BR2_PACKAGE_DLIB=y
BR2_PACKAGE_MINIDLNA=y
BR2_PACKAGE_SHAIRPORT_SYNC=y
BR2_PACKAGE_TVHEADEND=y
# BR2_TARGET_ROOTFS_TAR is not set
It doesn't build _all_ packages that use ffmpeg, but the fact that it
built fine gave me a good enough confidence to apply the patch series.
Thanks for this work!
Thomas Petazzoni
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-10-18 20:05 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-13 21:50 [Buildroot] [PATCH 1/5] package/gerbera: fix build with ffmpeg 7.0 Bernd Kuhls
2026-10-13 21:50 ` [Buildroot] [PATCH 2/5] package/libcamera-apps: " Bernd Kuhls
2026-10-13 21:50 ` [Buildroot] [PATCH 3/5] package/kodi: support " Bernd Kuhls
2026-10-13 21:50 ` [Buildroot] [PATCH 4/5] package/kodi-inputstream-ffmpegdirect: Fix build with ffmpeg-7.0 Bernd Kuhls
2026-10-13 21:50 ` [Buildroot] [PATCH 5/5] package/ffmpeg: bump version to 7.0.3 Bernd Kuhls
2026-10-18 20:04 ` [Buildroot] [PATCH 1/5] package/gerbera: fix build with ffmpeg 7.0 Thomas Petazzoni via buildroot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox