Control: tags 1144033 + patch Control: tags 1144033 + pending
Dear maintainer, I've prepared an NMU for kodi (versioned as 2:21.3+dfsg-1.3) and will upload it to DELAYED/5 in a few minutes. Please feel free to tell me if I should cancel it. Regards, Sébastien
diffstat for kodi-21.3+dfsg kodi-21.3+dfsg changelog | 7 +++ patches/28058.patch | 72 ++++++++++++++++++++++++++++++++++++++ patches/ffmpeg9.patch | 93 ++++++++++++++++++++++++++++++++++++++++++++++++++ patches/series | 2 + 4 files changed, 174 insertions(+) diff -Nru kodi-21.3+dfsg/debian/changelog kodi-21.3+dfsg/debian/changelog --- kodi-21.3+dfsg/debian/changelog 2026-06-18 09:39:22.000000000 +0200 +++ kodi-21.3+dfsg/debian/changelog 2026-10-02 13:40:15.000000000 +0200 @@ -1,3 +1,10 @@ +kodi (2:21.3+dfsg-1.3) unstable; urgency=medium + + * Non-maintainer upload. + * Add patches to fix FTBFS with ffmpeg 9.0 (Closes: #1144033) + + -- Sébastien Noel <[email protected]> Fri, 02 Oct 2026 13:40:15 +0200 + kodi (2:21.3+dfsg-1.2) unstable; urgency=medium * Non-maintainer upload with maintainer's blessing diff -Nru kodi-21.3+dfsg/debian/patches/28058.patch kodi-21.3+dfsg/debian/patches/28058.patch --- kodi-21.3+dfsg/debian/patches/28058.patch 1970-01-01 01:00:00.000000000 +0100 +++ kodi-21.3+dfsg/debian/patches/28058.patch 2026-09-21 10:04:13.000000000 +0200 @@ -0,0 +1,72 @@ +From c4913a2c601c44b44ce24b7f8decb981adedccdf Mon Sep 17 00:00:00 2001 +From: Stephan Sundermann <[email protected]> +Date: Sat, 21 Mar 2026 09:54:49 +0100 +Subject: Bump to ffmpeg 8.1 + +--- a/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxFFmpeg.cpp ++++ b/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxFFmpeg.cpp +@@ -2318,9 +2318,8 @@ void CDVDDemuxFFmpeg::ParsePacket(AVPacket* pkt) + if (!stream) + return; + +- if (parser->second->m_parserCtx && +- parser->second->m_parserCtx->parser && +- !st->codecpar->extradata) ++ if (parser->second->m_parserCtx && parser->second->m_parserCtx->parser && ++ parser->second->m_codecCtx && !st->codecpar->extradata) + { + FFmpegExtraData retExtraData = GetPacketExtradata(pkt, st->codecpar); + if (retExtraData) +@@ -2328,28 +2327,31 @@ void CDVDDemuxFFmpeg::ParsePacket(AVPacket* pkt) + st->codecpar->extradata_size = retExtraData.GetSize(); + st->codecpar->extradata = retExtraData.TakeData(); + +- if (parser->second->m_parserCtx->parser->parser_parse) ++ parser->second->m_codecCtx->extradata = st->codecpar->extradata; ++ parser->second->m_codecCtx->extradata_size = st->codecpar->extradata_size; ++ uint8_t* outbufptr; ++ int bufSize; ++ parser->second->m_parserCtx->flags |= PARSER_FLAG_COMPLETE_FRAMES; ++ int ret = ++ av_parser_parse2(parser->second->m_parserCtx, parser->second->m_codecCtx, &outbufptr, ++ &bufSize, pkt->data, pkt->size, pkt->pts, pkt->dts, pkt->pos); ++ parser->second->m_codecCtx->extradata = nullptr; ++ parser->second->m_codecCtx->extradata_size = 0; ++ ++ if (ret < 0) + { +- parser->second->m_codecCtx->extradata = st->codecpar->extradata; +- parser->second->m_codecCtx->extradata_size = st->codecpar->extradata_size; +- const uint8_t* outbufptr; +- int bufSize; +- parser->second->m_parserCtx->flags |= PARSER_FLAG_COMPLETE_FRAMES; +- parser->second->m_parserCtx->parser->parser_parse(parser->second->m_parserCtx, +- parser->second->m_codecCtx, &outbufptr, +- &bufSize, pkt->data, pkt->size); +- parser->second->m_codecCtx->extradata = nullptr; +- parser->second->m_codecCtx->extradata_size = 0; +- +- if (parser->second->m_parserCtx->width != 0) +- { +- st->codecpar->width = parser->second->m_parserCtx->width; +- st->codecpar->height = parser->second->m_parserCtx->height; +- } +- else +- { +- CLog::Log(LOGERROR, "CDVDDemuxFFmpeg::ParsePacket() invalid width/height"); +- } ++ CLog::LogF(LOGERROR, "error parsing packet: {}", ret); ++ return; ++ } ++ ++ if (parser->second->m_parserCtx->width != 0) ++ { ++ st->codecpar->width = parser->second->m_parserCtx->width; ++ st->codecpar->height = parser->second->m_parserCtx->height; ++ } ++ else ++ { ++ CLog::Log(LOGERROR, "CDVDDemuxFFmpeg::ParsePacket() invalid width/height"); + } + } + } diff -Nru kodi-21.3+dfsg/debian/patches/ffmpeg9.patch kodi-21.3+dfsg/debian/patches/ffmpeg9.patch --- kodi-21.3+dfsg/debian/patches/ffmpeg9.patch 1970-01-01 01:00:00.000000000 +0100 +++ kodi-21.3+dfsg/debian/patches/ffmpeg9.patch 2026-09-21 09:49:51.000000000 +0200 @@ -0,0 +1,93 @@ +From 4a9f358490ed7fdd7c63e03a16e261ad3863defc Mon Sep 17 00:00:00 2001 +From: Stephan Sundermann <[email protected]> +Date: Tue, 3 Dec 2024 23:40:37 +0100 +Subject: [ffmpeg] Remove deprecated use of avcodec->sample_fmts + +--- + xbmc/cdrip/EncoderFFmpeg.cpp | 13 ++++++++++- + .../AudioEngine/Encoders/AEEncoderFFmpeg.cpp | 22 ++++++++++++++----- + 2 files changed, 29 insertions(+), 6 deletions(-) + +diff --git a/xbmc/cdrip/EncoderFFmpeg.cpp b/xbmc/cdrip/EncoderFFmpeg.cpp +index 907d2591ddba7..a2e571ced52f3 100644 +--- a/xbmc/cdrip/EncoderFFmpeg.cpp ++++ b/xbmc/cdrip/EncoderFFmpeg.cpp +@@ -97,10 +97,21 @@ bool CEncoderFFmpeg::Init() + + /* Set the basic encoder parameters. + * The input file's sample rate is used to avoid a sample rate conversion. */ ++ const AVSampleFormat* sampleFmts = nullptr; ++ int numFmts = 0; ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(61, 12, 100) ++ if (avcodec_get_supported_config(m_codecCtx, codec, AV_CODEC_CONFIG_SAMPLE_FORMAT, 0, ++ reinterpret_cast<const void**>(&sampleFmts), &numFmts) < 0) ++ { ++ throw FFMpegException("Failed to get supported sample formats"); ++ } ++#else ++ sampleFmts = codec->sample_fmts; ++#endif + av_channel_layout_uninit(&m_codecCtx->ch_layout); + av_channel_layout_default(&m_codecCtx->ch_layout, m_iInChannels); + m_codecCtx->sample_rate = m_iInSampleRate; +- m_codecCtx->sample_fmt = codec->sample_fmts[0]; ++ m_codecCtx->sample_fmt = sampleFmts[0]; + m_codecCtx->bit_rate = bitrate; + + /* Allow experimental encoders (like FFmpeg builtin AAC encoder) */ +diff --git a/xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.cpp b/xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.cpp +index d129e84415595..da4ee594891b1 100644 +--- a/xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.cpp ++++ b/xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.cpp +@@ -117,8 +117,19 @@ bool CAEEncoderFFmpeg::Initialize(AEAudioFormat &format, bool allow_planar_input + av_channel_layout_uninit(&m_CodecCtx->ch_layout); + av_channel_layout_from_mask(&m_CodecCtx->ch_layout, AV_CH_LAYOUT_5POINT1_BACK); + ++ const AVSampleFormat* sampleFmts = nullptr; ++ int numFmts = 0; ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(61, 12, 100) ++ avcodec_get_supported_config(m_CodecCtx, codec, AV_CODEC_CONFIG_SAMPLE_FORMAT, 0, ++ reinterpret_cast<const void**>(&sampleFmts), &numFmts); ++#else ++ sampleFmts = codec->sample_fmts; ++ for (numFmts = 0; sampleFmts[numFmts] != AV_SAMPLE_FMT_NONE; ++numFmts) ++ ; ++#endif ++ + /* select a suitable data format */ +- if (codec->sample_fmts) ++ if (sampleFmts) + { + bool hasFloat = false; + bool hasDouble = false; +@@ -128,9 +139,9 @@ bool CAEEncoderFFmpeg::Initialize(AEAudioFormat &format, bool allow_planar_input + bool hasFloatP = false; + bool hasUnknownFormat = false; + +- for(int i = 0; codec->sample_fmts[i] != AV_SAMPLE_FMT_NONE; ++i) ++ for (int i = 0; i < numFmts; ++i) + { +- switch (codec->sample_fmts[i]) ++ switch (sampleFmts[i]) + { + case AV_SAMPLE_FMT_FLT: hasFloat = true; break; + case AV_SAMPLE_FMT_DBL: hasDouble = true; break; +@@ -143,7 +154,8 @@ bool CAEEncoderFFmpeg::Initialize(AEAudioFormat &format, bool allow_planar_input + else + hasUnknownFormat = true; + break; +- case AV_SAMPLE_FMT_NONE: return false; ++ case AV_SAMPLE_FMT_NONE: ++ continue; + default: hasUnknownFormat = true; break; + } + } +@@ -180,7 +192,7 @@ bool CAEEncoderFFmpeg::Initialize(AEAudioFormat &format, bool allow_planar_input + } + else if (hasUnknownFormat) + { +- m_CodecCtx->sample_fmt = codec->sample_fmts[0]; ++ m_CodecCtx->sample_fmt = sampleFmts[0]; + format.m_dataFormat = AE_FMT_FLOAT; + m_NeedConversion = true; + CLog::Log(LOGINFO, diff -Nru kodi-21.3+dfsg/debian/patches/series kodi-21.3+dfsg/debian/patches/series --- kodi-21.3+dfsg/debian/patches/series 2026-06-18 09:39:22.000000000 +0200 +++ kodi-21.3+dfsg/debian/patches/series 2026-09-28 16:17:14.000000000 +0200 @@ -28,3 +28,5 @@ 26471.patch 26996.patch 27149.patch +28058.patch +ffmpeg9.patch

