Control: tags 1115017 + patch
Control: tags 1115017 + pending

Dear maintainer,

I've prepared an NMU for kodi (versioned as 2:21.3+dfsg-1.1) and 
uploaded it to DELAYED/10. Please feel free to tell me if I should 
cancel it.

cu
Adrian
diffstat for kodi-21.3+dfsg kodi-21.3+dfsg

 changelog           |    8 
 control             |    1 
 patches/26471.patch |   48 ++++
 patches/26996.patch |  596 +++++++++++++++++++++++++++++++++++++++++++++++++
 patches/27149.patch |  623 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 patches/series      |    3 
 6 files changed, 1278 insertions(+), 1 deletion(-)

diff -Nru kodi-21.3+dfsg/debian/changelog kodi-21.3+dfsg/debian/changelog
--- kodi-21.3+dfsg/debian/changelog	2025-11-08 12:19:48.000000000 +0200
+++ kodi-21.3+dfsg/debian/changelog	2026-05-03 12:49:43.000000000 +0300
@@ -1,3 +1,11 @@
+kodi (2:21.3+dfsg-1.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Add patches backported by Sébastien Noel to fix FTBFS with ffmpeg 8.0
+    and remove the build dependency on libpostproc-dev. (Closes: #1115017)
+
+ -- Adrian Bunk <[email protected]>  Sun, 03 May 2026 12:49:43 +0300
+
 kodi (2:21.3+dfsg-1) unstable; urgency=high
 
   * New upstream version 21.3+dfsg
diff -Nru kodi-21.3+dfsg/debian/control kodi-21.3+dfsg/debian/control
--- kodi-21.3+dfsg/debian/control	2025-11-08 12:19:48.000000000 +0200
+++ kodi-21.3+dfsg/debian/control	2026-05-03 12:41:47.000000000 +0300
@@ -76,7 +76,6 @@
                libplist-dev,
                libpng-dev,
                libpng-dev:native,
-               libpostproc-dev (>= 7:4.2.2),
                libpulse-dev,
                libpython3-dev,
                librsvg2-bin,
diff -Nru kodi-21.3+dfsg/debian/patches/26471.patch kodi-21.3+dfsg/debian/patches/26471.patch
--- kodi-21.3+dfsg/debian/patches/26471.patch	1970-01-01 02:00:00.000000000 +0200
+++ kodi-21.3+dfsg/debian/patches/26471.patch	2026-05-03 12:40:38.000000000 +0300
@@ -0,0 +1,48 @@
+Description: make use of internal FFmpeg CPU capabilities detection for video post-processing
+Origin: https://github.com/xbmc/xbmc/pull/26471
+
+--- a/xbmc/cores/FFmpeg.h
++++ b/xbmc/cores/FFmpeg.h
+@@ -9,7 +9,6 @@
+ #pragma once
+ 
+ #include "ServiceBroker.h"
+-#include "utils/CPUInfo.h"
+ #include "utils/StringUtils.h"
+ 
+ extern "C" {
+@@ -42,23 +41,6 @@
+ 
+ } // namespace FFMPEG_HELP_TOOLS
+ 
+-inline int PPCPUFlags()
+-{
+-  unsigned int cpuFeatures = CServiceBroker::GetCPUInfo()->GetCPUFeatures();
+-  int flags = 0;
+-
+-  if (cpuFeatures & CPU_FEATURE_MMX)
+-    flags |= PP_CPU_CAPS_MMX;
+-  if (cpuFeatures & CPU_FEATURE_MMX2)
+-    flags |= PP_CPU_CAPS_MMX2;
+-  if (cpuFeatures & CPU_FEATURE_3DNOW)
+-    flags |= PP_CPU_CAPS_3DNOW;
+-  if (cpuFeatures & CPU_FEATURE_ALTIVEC)
+-    flags |= PP_CPU_CAPS_ALTIVEC;
+-
+-  return flags;
+-}
+-
+ // callback used for logging
+ void ff_avutil_log(void* ptr, int level, const char* format, va_list va);
+ void ff_flush_avutil_log_buffers(void);
+--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoPPFFmpeg.cpp
++++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoPPFFmpeg.cpp
+@@ -54,7 +54,7 @@ bool CDVDVideoPPFFmpeg::CheckInit(int iWidth, int iHeight)
+       Dispose();
+     }
+ 
+-    m_pContext = pp_get_context(iWidth, iHeight, PPCPUFlags() | PP_FORMAT_420);
++    m_pContext = pp_get_context(iWidth, iHeight, PP_CPU_CAPS_AUTO | PP_FORMAT_420);
+ 
+     m_iInitWidth = iWidth;
+     m_iInitHeight = iHeight;
diff -Nru kodi-21.3+dfsg/debian/patches/26996.patch kodi-21.3+dfsg/debian/patches/26996.patch
--- kodi-21.3+dfsg/debian/patches/26996.patch	1970-01-01 02:00:00.000000000 +0200
+++ kodi-21.3+dfsg/debian/patches/26996.patch	2026-05-03 12:40:44.000000000 +0300
@@ -0,0 +1,596 @@
+Description: Use AV_PROFILE_* instead of the deprecated FF_PROFILE_*
+Origin: https://github.com/xbmc/xbmc/pull/26996
+
+--- a/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
++++ b/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
+@@ -2053,9 +2053,9 @@ std::string CDVDDemuxFFmpeg::GetStreamCo
+     /* use profile to determine the DTS type */
+     if (stream->codec == AV_CODEC_ID_DTS)
+     {
+-      if (stream->profile == FF_PROFILE_DTS_HD_MA)
++      if (stream->profile == AV_PROFILE_DTS_HD_MA)
+         strName = "dtshd_ma";
+-      else if (stream->profile == FF_PROFILE_DTS_HD_HRA)
++      else if (stream->profile == AV_PROFILE_DTS_HD_HRA)
+         strName = "dtshd_hra";
+       else
+         strName = "dca";
+--- a/xbmc/cores/VideoPlayer/AudioSinkAE.cpp
++++ b/xbmc/cores/VideoPlayer/AudioSinkAE.cpp
+@@ -19,6 +19,11 @@
+ 
+ #include <mutex>
+ 
++extern "C"
++{
++#include <libavcodec/defs.h>
++}
++
+ using namespace std::chrono_literals;
+ 
+ CAudioSinkAE::CAudioSinkAE(CDVDClock *clock) : m_pClock(clock)
+@@ -353,9 +358,9 @@ CAEStreamInfo::DataType CAudioSinkAE::Ge
+       break;
+ 
+     case AV_CODEC_ID_DTS:
+-      if (profile == FF_PROFILE_DTS_HD_HRA)
++      if (profile == AV_PROFILE_DTS_HD_HRA)
+         format.m_streamInfo.m_type = CAEStreamInfo::STREAM_TYPE_DTSHD;
+-      else if (profile == FF_PROFILE_DTS_HD_MA)
++      else if (profile == AV_PROFILE_DTS_HD_MA)
+         format.m_streamInfo.m_type = CAEStreamInfo::STREAM_TYPE_DTSHD_MA;
+       else
+         format.m_streamInfo.m_type = CAEStreamInfo::STREAM_TYPE_DTSHD_CORE;
+--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/AddonVideoCodec.cpp
++++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/AddonVideoCodec.cpp
+@@ -16,6 +16,11 @@
+ #include "cores/VideoPlayer/Interface/TimingConstants.h"
+ #include "utils/log.h"
+ 
++extern "C"
++{
++#include <libavcodec/defs.h>
++}
++
+ namespace
+ {
+ AVPixelFormat ConvertToPixelFormat(const VIDEOCODEC_FORMAT videoFormat)
+@@ -127,33 +132,33 @@ bool CAddonVideoCodec::CopyToInitData(VI
+     initData.codec = VIDEOCODEC_H264;
+     switch (hints.profile)
+     {
+-    case 0:
+-    case FF_PROFILE_UNKNOWN:
+-      initData.codecProfile = STREAMCODEC_PROFILE::CodecProfileUnknown;
+-      break;
+-    case FF_PROFILE_H264_BASELINE:
+-      initData.codecProfile = STREAMCODEC_PROFILE::H264CodecProfileBaseline;
+-      break;
+-    case FF_PROFILE_H264_MAIN:
+-      initData.codecProfile = STREAMCODEC_PROFILE::H264CodecProfileMain;
+-      break;
+-    case FF_PROFILE_H264_EXTENDED:
+-      initData.codecProfile = STREAMCODEC_PROFILE::H264CodecProfileExtended;
+-      break;
+-    case FF_PROFILE_H264_HIGH:
+-      initData.codecProfile = STREAMCODEC_PROFILE::H264CodecProfileHigh;
+-      break;
+-    case FF_PROFILE_H264_HIGH_10:
+-      initData.codecProfile = STREAMCODEC_PROFILE::H264CodecProfileHigh10;
+-      break;
+-    case FF_PROFILE_H264_HIGH_422:
+-      initData.codecProfile = STREAMCODEC_PROFILE::H264CodecProfileHigh422;
+-      break;
+-    case FF_PROFILE_H264_HIGH_444_PREDICTIVE:
+-      initData.codecProfile = STREAMCODEC_PROFILE::H264CodecProfileHigh444Predictive;
+-      break;
+-    default:
+-      return false;
++      case 0:
++      case AV_PROFILE_UNKNOWN:
++        initData.codecProfile = STREAMCODEC_PROFILE::CodecProfileUnknown;
++        break;
++      case AV_PROFILE_H264_BASELINE:
++        initData.codecProfile = STREAMCODEC_PROFILE::H264CodecProfileBaseline;
++        break;
++      case AV_PROFILE_H264_MAIN:
++        initData.codecProfile = STREAMCODEC_PROFILE::H264CodecProfileMain;
++        break;
++      case AV_PROFILE_H264_EXTENDED:
++        initData.codecProfile = STREAMCODEC_PROFILE::H264CodecProfileExtended;
++        break;
++      case AV_PROFILE_H264_HIGH:
++        initData.codecProfile = STREAMCODEC_PROFILE::H264CodecProfileHigh;
++        break;
++      case AV_PROFILE_H264_HIGH_10:
++        initData.codecProfile = STREAMCODEC_PROFILE::H264CodecProfileHigh10;
++        break;
++      case AV_PROFILE_H264_HIGH_422:
++        initData.codecProfile = STREAMCODEC_PROFILE::H264CodecProfileHigh422;
++        break;
++      case AV_PROFILE_H264_HIGH_444_PREDICTIVE:
++        initData.codecProfile = STREAMCODEC_PROFILE::H264CodecProfileHigh444Predictive;
++        break;
++      default:
++        return false;
+     }
+     break;
+   case AV_CODEC_ID_VP8:
+@@ -163,43 +168,43 @@ bool CAddonVideoCodec::CopyToInitData(VI
+     initData.codec = VIDEOCODEC_VP9;
+     switch (hints.profile)
+     {
+-    case FF_PROFILE_UNKNOWN:
+-      initData.codecProfile = STREAMCODEC_PROFILE::CodecProfileUnknown;
+-      break;
+-    case FF_PROFILE_VP9_0:
+-      initData.codecProfile = STREAMCODEC_PROFILE::VP9CodecProfile0;
+-      break;
+-    case FF_PROFILE_VP9_1:
+-      initData.codecProfile = STREAMCODEC_PROFILE::VP9CodecProfile1;
+-      break;
+-    case FF_PROFILE_VP9_2:
+-      initData.codecProfile = STREAMCODEC_PROFILE::VP9CodecProfile2;
+-      break;
+-    case FF_PROFILE_VP9_3:
+-      initData.codecProfile = STREAMCODEC_PROFILE::VP9CodecProfile3;
+-      break;
+-    default:
+-      return false;
++      case AV_PROFILE_UNKNOWN:
++        initData.codecProfile = STREAMCODEC_PROFILE::CodecProfileUnknown;
++        break;
++      case AV_PROFILE_VP9_0:
++        initData.codecProfile = STREAMCODEC_PROFILE::VP9CodecProfile0;
++        break;
++      case AV_PROFILE_VP9_1:
++        initData.codecProfile = STREAMCODEC_PROFILE::VP9CodecProfile1;
++        break;
++      case AV_PROFILE_VP9_2:
++        initData.codecProfile = STREAMCODEC_PROFILE::VP9CodecProfile2;
++        break;
++      case AV_PROFILE_VP9_3:
++        initData.codecProfile = STREAMCODEC_PROFILE::VP9CodecProfile3;
++        break;
++      default:
++        return false;
+     }
+     break;
+   case AV_CODEC_ID_AV1:
+     initData.codec = VIDEOCODEC_AV1;
+     switch (hints.profile)
+     {
+-    case FF_PROFILE_UNKNOWN:
+-      initData.codecProfile = STREAMCODEC_PROFILE::CodecProfileUnknown;
+-      break;
+-    case FF_PROFILE_AV1_MAIN:
+-      initData.codecProfile = STREAMCODEC_PROFILE::AV1CodecProfileMain;
+-      break;
+-    case FF_PROFILE_AV1_HIGH:
+-      initData.codecProfile = STREAMCODEC_PROFILE::AV1CodecProfileHigh;
+-      break;
+-    case FF_PROFILE_AV1_PROFESSIONAL:
+-      initData.codecProfile = STREAMCODEC_PROFILE::AV1CodecProfileProfessional;
+-      break;
+-    default:
+-      return false;
++      case AV_PROFILE_UNKNOWN:
++        initData.codecProfile = STREAMCODEC_PROFILE::CodecProfileUnknown;
++        break;
++      case AV_PROFILE_AV1_MAIN:
++        initData.codecProfile = STREAMCODEC_PROFILE::AV1CodecProfileMain;
++        break;
++      case AV_PROFILE_AV1_HIGH:
++        initData.codecProfile = STREAMCODEC_PROFILE::AV1CodecProfileHigh;
++        break;
++      case AV_PROFILE_AV1_PROFESSIONAL:
++        initData.codecProfile = STREAMCODEC_PROFILE::AV1CodecProfileProfessional;
++        break;
++      default:
++        return false;
+     }
+     break;
+   default:
+--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
++++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
+@@ -31,6 +31,7 @@
+ #include <mutex>
+ 
+ extern "C" {
++#include <libavcodec/defs.h>
+ #include <libavfilter/avfilter.h>
+ #include <libavfilter/buffersink.h>
+ #include <libavfilter/buffersrc.h>
+@@ -260,8 +261,8 @@ enum AVPixelFormat CDVDVideoCodecFFmpeg:
+   // 2nd condition:
+   // fix an ffmpeg issue here, it calls us with an invalid profile
+   // then a 2nd call with a valid one
+-  if(ctx->m_decoderState != STATE_HW_SINGLE ||
+-     (avctx->codec_id == AV_CODEC_ID_VC1 && avctx->profile == FF_PROFILE_UNKNOWN))
++  if (ctx->m_decoderState != STATE_HW_SINGLE ||
++      (avctx->codec_id == AV_CODEC_ID_VC1 && avctx->profile == AV_PROFILE_UNKNOWN))
+   {
+     AVPixelFormat defaultFmt = avcodec_default_get_format(avctx, fmt);
+     pixFmtName = av_get_pix_fmt_name(defaultFmt);
+@@ -1047,11 +1048,11 @@ bool CDVDVideoCodecFFmpeg::GetPictureCom
+   else if (m_pCodecContext->pix_fmt == AV_PIX_FMT_YUV420P10)
+     pVideoPicture->colorBits = 10;
+   else if (m_pCodecContext->codec_id == AV_CODEC_ID_HEVC &&
+-           m_pCodecContext->profile == FF_PROFILE_HEVC_MAIN_10)
++           m_pCodecContext->profile == AV_PROFILE_HEVC_MAIN_10)
+     pVideoPicture->colorBits = 10;
+   else if (m_pCodecContext->codec_id == AV_CODEC_ID_H264 &&
+-           (m_pCodecContext->profile == FF_PROFILE_H264_HIGH_10||
+-            m_pCodecContext->profile == FF_PROFILE_H264_HIGH_10_INTRA))
++           (m_pCodecContext->profile == AV_PROFILE_H264_HIGH_10 ||
++            m_pCodecContext->profile == AV_PROFILE_H264_HIGH_10_INTRA))
+     pVideoPicture->colorBits = 10;
+   else if ((m_pCodecContext->codec_id == AV_CODEC_ID_VP9 ||
+             m_pCodecContext->codec_id == AV_CODEC_ID_AV1) &&
+--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DXVA.cpp
++++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DXVA.cpp
+@@ -37,6 +37,11 @@
+ #include <initguid.h>
+ #include <sdkddkver.h>
+ 
++extern "C"
++{
++#include <libavcodec/defs.h>
++}
++
+ using namespace DXVA;
+ using namespace Microsoft::WRL;
+ using namespace std::chrono_literals;
+@@ -65,20 +70,20 @@ DEFINE_GUID(DXVA_NoEncrypt, 0x1b81beD0,
+ 
+ namespace
+ {
+-constexpr int PROFILES_MPEG2_SIMPLE[] = {FF_PROFILE_MPEG2_SIMPLE, FF_PROFILE_UNKNOWN};
+-constexpr int PROFILES_MPEG2_MAIN[] = {FF_PROFILE_MPEG2_SIMPLE, FF_PROFILE_MPEG2_MAIN,
+-                                       FF_PROFILE_UNKNOWN};
+-constexpr int PROFILES_H264_HIGH[] = {FF_PROFILE_H264_BASELINE,
+-                                      FF_PROFILE_H264_CONSTRAINED_BASELINE, FF_PROFILE_H264_MAIN,
+-                                      FF_PROFILE_H264_HIGH, FF_PROFILE_UNKNOWN};
+-constexpr int PROFILES_HEVC_MAIN[] = {FF_PROFILE_HEVC_MAIN, FF_PROFILE_UNKNOWN};
+-constexpr int PROFILES_HEVC_MAIN10[] = {FF_PROFILE_HEVC_MAIN, FF_PROFILE_HEVC_MAIN_10,
+-                                        FF_PROFILE_UNKNOWN};
+-constexpr int PROFILES_VP9_0[] = {FF_PROFILE_VP9_0, FF_PROFILE_UNKNOWN};
+-constexpr int PROFILES_VP9_10_2[] = {FF_PROFILE_VP9_2, FF_PROFILE_UNKNOWN};
+-constexpr int PROFILES_AV1_MAIN[] = {FF_PROFILE_AV1_MAIN, FF_PROFILE_UNKNOWN};
+-constexpr int PROFILES_AV1_HIGH[] = {FF_PROFILE_AV1_HIGH, FF_PROFILE_UNKNOWN};
+-constexpr int PROFILES_AV1_PROFESSIONAL[] = {FF_PROFILE_AV1_PROFESSIONAL, FF_PROFILE_UNKNOWN};
++constexpr int PROFILES_MPEG2_SIMPLE[] = {AV_PROFILE_MPEG2_SIMPLE, AV_PROFILE_UNKNOWN};
++constexpr int PROFILES_MPEG2_MAIN[] = {AV_PROFILE_MPEG2_SIMPLE, AV_PROFILE_MPEG2_MAIN,
++                                       AV_PROFILE_UNKNOWN};
++constexpr int PROFILES_H264_HIGH[] = {AV_PROFILE_H264_BASELINE,
++                                      AV_PROFILE_H264_CONSTRAINED_BASELINE, AV_PROFILE_H264_MAIN,
++                                      AV_PROFILE_H264_HIGH, AV_PROFILE_UNKNOWN};
++constexpr int PROFILES_HEVC_MAIN[] = {AV_PROFILE_HEVC_MAIN, AV_PROFILE_UNKNOWN};
++constexpr int PROFILES_HEVC_MAIN10[] = {AV_PROFILE_HEVC_MAIN, AV_PROFILE_HEVC_MAIN_10,
++                                        AV_PROFILE_UNKNOWN};
++constexpr int PROFILES_VP9_0[] = {AV_PROFILE_VP9_0, AV_PROFILE_UNKNOWN};
++constexpr int PROFILES_VP9_10_2[] = {AV_PROFILE_VP9_2, AV_PROFILE_UNKNOWN};
++constexpr int PROFILES_AV1_MAIN[] = {AV_PROFILE_AV1_MAIN, AV_PROFILE_UNKNOWN};
++constexpr int PROFILES_AV1_HIGH[] = {AV_PROFILE_AV1_HIGH, AV_PROFILE_UNKNOWN};
++constexpr int PROFILES_AV1_PROFESSIONAL[] = {AV_PROFILE_AV1_PROFESSIONAL, AV_PROFILE_UNKNOWN};
+ } // namespace
+ 
+ typedef struct
+@@ -460,10 +465,10 @@ bool CContext::GetFormatAndConfig(AVCode
+       supported = false;
+       if (mode.profiles == nullptr)
+         supported = true;
+-      else if (avctx->profile == FF_PROFILE_UNKNOWN)
++      else if (avctx->profile == AV_PROFILE_UNKNOWN)
+         supported = true;
+       else
+-        for (const int* pProfile = &mode.profiles[0]; *pProfile != FF_PROFILE_UNKNOWN; ++pProfile)
++        for (const int* pProfile = &mode.profiles[0]; *pProfile != AV_PROFILE_UNKNOWN; ++pProfile)
+         {
+           if (*pProfile == avctx->profile)
+           {
+@@ -482,9 +487,9 @@ bool CContext::GetFormatAndConfig(AVCode
+     {
+       bool bHighBits =
+           (avctx->codec_id == AV_CODEC_ID_HEVC && (avctx->sw_pix_fmt == AV_PIX_FMT_YUV420P10 ||
+-                                                   avctx->profile == FF_PROFILE_HEVC_MAIN_10)) ||
++                                                   avctx->profile == AV_PROFILE_HEVC_MAIN_10)) ||
+           (avctx->codec_id == AV_CODEC_ID_VP9 &&
+-           (avctx->sw_pix_fmt == AV_PIX_FMT_YUV420P10 || avctx->profile == FF_PROFILE_VP9_2)) ||
++           (avctx->sw_pix_fmt == AV_PIX_FMT_YUV420P10 || avctx->profile == AV_PROFILE_VP9_2)) ||
+           (avctx->codec_id == AV_CODEC_ID_AV1 && avctx->sw_pix_fmt == AV_PIX_FMT_YUV420P10);
+ 
+       if (bHighBits && render_targets_dxgi[j] < DXGI_FORMAT_P010)
+--- a/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemux.cpp
++++ b/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemux.cpp
+@@ -23,7 +23,7 @@ std::string CDemuxStreamAudio::GetStream
+       break;
+     case AV_CODEC_ID_EAC3:
+     {
+-      if (profile == FF_PROFILE_EAC3_DDP_ATMOS)
++      if (profile == AV_PROFILE_EAC3_DDP_ATMOS)
+         strInfo = "DD+ ATMOS ";
+       else
+         strInfo = "DD+ ";
+@@ -33,25 +33,25 @@ std::string CDemuxStreamAudio::GetStream
+     {
+       switch (profile)
+       {
+-        case FF_PROFILE_DTS_96_24:
++        case AV_PROFILE_DTS_96_24:
+           strInfo = "DTS 96/24 ";
+           break;
+-        case FF_PROFILE_DTS_ES:
++        case AV_PROFILE_DTS_ES:
+           strInfo = "DTS ES ";
+           break;
+-        case FF_PROFILE_DTS_EXPRESS:
++        case AV_PROFILE_DTS_EXPRESS:
+           strInfo = "DTS EXPRESS ";
+           break;
+-        case FF_PROFILE_DTS_HD_MA:
++        case AV_PROFILE_DTS_HD_MA:
+           strInfo = "DTS-HD MA ";
+           break;
+-        case FF_PROFILE_DTS_HD_HRA:
++        case AV_PROFILE_DTS_HD_HRA:
+           strInfo = "DTS-HD HRA ";
+           break;
+-        case FF_PROFILE_DTS_HD_MA_X:
++        case AV_PROFILE_DTS_HD_MA_X:
+           strInfo = "DTS-HD MA X ";
+           break;
+-        case FF_PROFILE_DTS_HD_MA_X_IMAX:
++        case AV_PROFILE_DTS_HD_MA_X_IMAX:
+           strInfo = "DTS-HD MA X (IMAX) ";
+           break;
+         default:
+@@ -67,7 +67,7 @@ std::string CDemuxStreamAudio::GetStream
+       strInfo = "MP3 ";
+       break;
+     case AV_CODEC_ID_TRUEHD:
+-      if (profile == FF_PROFILE_TRUEHD_ATMOS)
++      if (profile == AV_PROFILE_TRUEHD_ATMOS)
+         strInfo = "TrueHD ATMOS ";
+       else
+         strInfo = "TrueHD ";
+@@ -76,21 +76,21 @@ std::string CDemuxStreamAudio::GetStream
+     {
+       switch (profile)
+       {
+-        case FF_PROFILE_AAC_LOW:
+-        case FF_PROFILE_MPEG2_AAC_LOW:
++        case AV_PROFILE_AAC_LOW:
++        case AV_PROFILE_MPEG2_AAC_LOW:
+           strInfo = "AAC-LC ";
+           break;
+-        case FF_PROFILE_AAC_HE:
+-        case FF_PROFILE_MPEG2_AAC_HE:
++        case AV_PROFILE_AAC_HE:
++        case AV_PROFILE_MPEG2_AAC_HE:
+           strInfo = "HE-AAC ";
+           break;
+-        case FF_PROFILE_AAC_HE_V2:
++        case AV_PROFILE_AAC_HE_V2:
+           strInfo = "HE-AACv2 ";
+           break;
+-        case FF_PROFILE_AAC_SSR:
++        case AV_PROFILE_AAC_SSR:
+           strInfo = "AAC-SSR ";
+           break;
+-        case FF_PROFILE_AAC_LTP:
++        case AV_PROFILE_AAC_LTP:
+           strInfo = "AAC-LTP ";
+           break;
+         default:
+--- a/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemux.h
++++ b/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemux.h
+@@ -33,6 +33,7 @@ class IAddonProvider;
+ extern "C"
+ {
+ #include <libavcodec/avcodec.h>
++#include <libavcodec/defs.h>
+ #include <libavutil/dovi_meta.h>
+ #include <libavutil/mastering_display_metadata.h>
+ }
+@@ -78,8 +79,8 @@ public:
+     dvdNavId = 0;
+     demuxerId = -1;
+     codec_fourcc = 0;
+-    profile = FF_PROFILE_UNKNOWN;
+-    level = FF_LEVEL_UNKNOWN;
++    profile = AV_PROFILE_UNKNOWN;
++    level = AV_LEVEL_UNKNOWN;
+     type = STREAM_NONE;
+     source = STREAM_SOURCE_NONE;
+     iDuration = 0;
+--- a/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxClient.cpp
++++ b/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxClient.cpp
+@@ -19,6 +19,11 @@
+ #include <type_traits>
+ #include <utility>
+ 
++extern "C"
++{
++#include <libavcodec/defs.h>
++}
++
+ class CDemuxStreamClientInternal
+ {
+ public:
+@@ -206,7 +211,7 @@ bool CDVDDemuxClient::ParsePacket(DemuxP
+   if (len >= 0)
+   {
+     if (stream->m_context->profile != st->profile &&
+-        stream->m_context->profile != FF_PROFILE_UNKNOWN)
++        stream->m_context->profile != AV_PROFILE_UNKNOWN)
+     {
+       CLog::Log(LOGDEBUG, "CDVDDemuxClient::ParsePacket - ({}) profile changed from {} to {}", st->uniqueId, st->profile, stream->m_context->profile);
+       st->profile = stream->m_context->profile;
+@@ -214,8 +219,7 @@ bool CDVDDemuxClient::ParsePacket(DemuxP
+       st->disabled = false;
+     }
+ 
+-    if (stream->m_context->level != st->level &&
+-        stream->m_context->level != FF_LEVEL_UNKNOWN)
++    if (stream->m_context->level != st->level && stream->m_context->level != AV_LEVEL_UNKNOWN)
+     {
+       CLog::Log(LOGDEBUG, "CDVDDemuxClient::ParsePacket - ({}) level changed from {} to {}", st->uniqueId, st->level, stream->m_context->level);
+       st->level = stream->m_context->level;
+--- a/xbmc/cores/VideoPlayer/DVDInputStreams/InputStreamAddon.cpp
++++ b/xbmc/cores/VideoPlayer/DVDInputStreams/InputStreamAddon.cpp
+@@ -26,6 +26,11 @@
+ 
+ #include <memory>
+ 
++extern "C"
++{
++#include <libavcodec/defs.h>
++}
++
+ CInputStreamProvider::CInputStreamProvider(const ADDON::AddonInfoPtr& addonInfo,
+                                            KODI_HANDLE parentInstance)
+   : m_addonInfo(addonInfo), m_parentInstance(parentInstance)
+@@ -693,35 +698,35 @@ int CInputStreamAddon::ConvertVideoCodec
+   switch (profile)
+   {
+   case H264CodecProfileBaseline:
+-    return FF_PROFILE_H264_BASELINE;
++    return AV_PROFILE_H264_BASELINE;
+   case H264CodecProfileMain:
+-    return FF_PROFILE_H264_MAIN;
++    return AV_PROFILE_H264_MAIN;
+   case H264CodecProfileExtended:
+-    return FF_PROFILE_H264_EXTENDED;
++    return AV_PROFILE_H264_EXTENDED;
+   case H264CodecProfileHigh:
+-    return FF_PROFILE_H264_HIGH;
++    return AV_PROFILE_H264_HIGH;
+   case H264CodecProfileHigh10:
+-    return FF_PROFILE_H264_HIGH_10;
++    return AV_PROFILE_H264_HIGH_10;
+   case H264CodecProfileHigh422:
+-    return FF_PROFILE_H264_HIGH_422;
++    return AV_PROFILE_H264_HIGH_422;
+   case H264CodecProfileHigh444Predictive:
+-    return FF_PROFILE_H264_HIGH_444_PREDICTIVE;
++    return AV_PROFILE_H264_HIGH_444_PREDICTIVE;
+   case VP9CodecProfile0:
+-    return FF_PROFILE_VP9_0;
++    return AV_PROFILE_VP9_0;
+   case VP9CodecProfile1:
+-    return FF_PROFILE_VP9_1;
++    return AV_PROFILE_VP9_1;
+   case VP9CodecProfile2:
+-    return FF_PROFILE_VP9_2;
++    return AV_PROFILE_VP9_2;
+   case VP9CodecProfile3:
+-    return FF_PROFILE_VP9_3;
++    return AV_PROFILE_VP9_3;
+   case AV1CodecProfileMain:
+-    return FF_PROFILE_AV1_MAIN;
++    return AV_PROFILE_AV1_MAIN;
+   case AV1CodecProfileHigh:
+-    return FF_PROFILE_AV1_HIGH;
++    return AV_PROFILE_AV1_HIGH;
+   case AV1CodecProfileProfessional:
+-    return FF_PROFILE_AV1_PROFESSIONAL;
++    return AV_PROFILE_AV1_PROFESSIONAL;
+   default:
+-    return FF_PROFILE_UNKNOWN;
++    return AV_PROFILE_UNKNOWN;
+   }
+ }
+ 
+@@ -730,45 +735,45 @@ int CInputStreamAddon::ConvertAudioCodec
+   switch (profile)
+   {
+     case AACCodecProfileMAIN:
+-      return FF_PROFILE_AAC_MAIN;
++      return AV_PROFILE_AAC_MAIN;
+     case AACCodecProfileLOW:
+-      return FF_PROFILE_AAC_LOW;
++      return AV_PROFILE_AAC_LOW;
+     case AACCodecProfileSSR:
+-      return FF_PROFILE_AAC_SSR;
++      return AV_PROFILE_AAC_SSR;
+     case AACCodecProfileLTP:
+-      return FF_PROFILE_AAC_LTP;
++      return AV_PROFILE_AAC_LTP;
+     case AACCodecProfileHE:
+-      return FF_PROFILE_AAC_HE;
++      return AV_PROFILE_AAC_HE;
+     case AACCodecProfileHEV2:
+-      return FF_PROFILE_AAC_HE_V2;
++      return AV_PROFILE_AAC_HE_V2;
+     case AACCodecProfileLD:
+-      return FF_PROFILE_AAC_LD;
++      return AV_PROFILE_AAC_LD;
+     case AACCodecProfileELD:
+-      return FF_PROFILE_AAC_ELD;
++      return AV_PROFILE_AAC_ELD;
+     case MPEG2AACCodecProfileLOW:
+-      return FF_PROFILE_MPEG2_AAC_LOW;
++      return AV_PROFILE_MPEG2_AAC_LOW;
+     case MPEG2AACCodecProfileHE:
+-      return FF_PROFILE_MPEG2_AAC_HE;
++      return AV_PROFILE_MPEG2_AAC_HE;
+     case DTSCodecProfile:
+-      return FF_PROFILE_DTS;
++      return AV_PROFILE_DTS;
+     case DTSCodecProfileES:
+-      return FF_PROFILE_DTS_ES;
++      return AV_PROFILE_DTS_ES;
+     case DTSCodecProfile9624:
+-      return FF_PROFILE_DTS_96_24;
++      return AV_PROFILE_DTS_96_24;
+     case DTSCodecProfileHDHRA:
+-      return FF_PROFILE_DTS_HD_HRA;
++      return AV_PROFILE_DTS_HD_HRA;
+     case DTSCodecProfileHDMA:
+-      return FF_PROFILE_DTS_HD_MA;
++      return AV_PROFILE_DTS_HD_MA;
+     case DTSCodecProfileHDExpress:
+-      return FF_PROFILE_DTS_EXPRESS;
++      return AV_PROFILE_DTS_EXPRESS;
+     case DTSCodecProfileHDMAX:
+-      return FF_PROFILE_DTS_HD_MA_X;
++      return AV_PROFILE_DTS_HD_MA_X;
+     case DTSCodecProfileHDMAIMAX:
+-      return FF_PROFILE_DTS_HD_MA_X_IMAX;
++      return AV_PROFILE_DTS_HD_MA_X_IMAX;
+     case DDPlusCodecProfileAtmos:
+-      return FF_PROFILE_EAC3_DDP_ATMOS;
++      return AV_PROFILE_EAC3_DDP_ATMOS;
+     default:
+-      return FF_PROFILE_UNKNOWN;
++      return AV_PROFILE_UNKNOWN;
+   }
+ }
+ 
+--- a/xbmc/cores/paplayer/VideoPlayerCodec.cpp
++++ b/xbmc/cores/paplayer/VideoPlayerCodec.cpp
+@@ -22,6 +22,11 @@
+ #include "utils/StringUtils.h"
+ #include "utils/log.h"
+ 
++extern "C"
++{
++#include <libavcodec/defs.h>
++}
++
+ VideoPlayerCodec::VideoPlayerCodec() : m_processInfo(CProcessInfo::CreateInstance())
+ {
+   m_CodecName = "VideoPlayer";
+@@ -497,9 +502,9 @@ CAEStreamInfo::DataType VideoPlayerCodec
+       break;
+ 
+     case AV_CODEC_ID_DTS:
+-      if (profile == FF_PROFILE_DTS_HD_HRA)
++      if (profile == AV_PROFILE_DTS_HD_HRA)
+         format.m_streamInfo.m_type = CAEStreamInfo::STREAM_TYPE_DTSHD;
+-      else if (profile == FF_PROFILE_DTS_HD_MA)
++      else if (profile == AV_PROFILE_DTS_HD_MA)
+         format.m_streamInfo.m_type = CAEStreamInfo::STREAM_TYPE_DTSHD_MA;
+       else
+         format.m_streamInfo.m_type = CAEStreamInfo::STREAM_TYPE_DTSHD_CORE;
diff -Nru kodi-21.3+dfsg/debian/patches/27149.patch kodi-21.3+dfsg/debian/patches/27149.patch
--- kodi-21.3+dfsg/debian/patches/27149.patch	1970-01-01 02:00:00.000000000 +0200
+++ kodi-21.3+dfsg/debian/patches/27149.patch	2026-05-03 12:40:48.000000000 +0300
@@ -0,0 +1,623 @@
+Description: Update to ffmpeg 8.0
+Origin: https://github.com/xbmc/xbmc/pull/27149
+
+--- a/cmake/modules/FindFFMPEG.cmake
++++ b/cmake/modules/FindFFMPEG.cmake
+@@ -192,13 +192,14 @@ else()
+                   libavformat${_avformat_ver}
+                   libavutil${_avutil_ver}
+                   libswscale${_swscale_ver}
+-                  libswresample${_swresample_ver}
+-                  libpostproc${_postproc_ver})
++                  libswresample${_swresample_ver})
+ 
+   if(NOT WIN32)
+     find_package(PkgConfig REQUIRED)
+ 
+-    pkg_check_modules(PC_FFMPEG ${FFMPEG_PKGS})
++    # explicitly set quiet, as another search that has output is run anyway
++    pkg_check_modules(PC_FFMPEG ${FFMPEG_PKGS} QUIET)
++    pkg_check_modules(PC_FFMPEGPOSTPROC libpostproc${_postproc_ver} QUIET)
+   endif()
+ 
+   if((PC_FFMPEG_FOUND
+@@ -207,8 +208,7 @@ else()
+       AND PC_FFMPEG_libavformat_VERSION
+       AND PC_FFMPEG_libavutil_VERSION
+       AND PC_FFMPEG_libswscale_VERSION
+-      AND PC_FFMPEG_libswresample_VERSION
+-      AND PC_FFMPEG_libpostproc_VERSION)
++      AND PC_FFMPEG_libswresample_VERSION)
+      OR WIN32)
+     set(FFMPEG_VERSION ${REQUIRED_FFMPEG_VERSION})
+ 
+@@ -226,7 +226,7 @@ else()
+     endmacro()
+ 
+     find_path(FFMPEG_INCLUDE_DIRS libavcodec/avcodec.h libavfilter/avfilter.h libavformat/avformat.h
+-                                  libavutil/avutil.h libswscale/swscale.h libpostproc/postprocess.h
++                                  libavutil/avutil.h libswscale/swscale.h
+               PATH_SUFFIXES ffmpeg
+               HINTS ${DEPENDS_PATH}/include
+               ${${CORE_PLATFORM_LC}_SEARCH_CONFIG})
+@@ -236,6 +236,12 @@ else()
+       ffmpeg_find_lib(${_libname})
+     endforeach()
+ 
++    find_library(FFMPEG_LIBPOSTPROC
++            NAMES postproc
++            PATH_SUFFIXES ffmpeg/libpostproc
++            HINTS ${DEPENDS_PATH}/lib ${PC_FFMPEG_LIBPOSTPROC_LIBDIR}
++            ${${CORE_PLATFORM_LC}_SEARCH_CONFIG})
++
+     include(FindPackageHandleStandardArgs)
+     find_package_handle_standard_args(FFMPEG
+                                       VERSION_VAR FFMPEG_VERSION
+@@ -246,7 +252,6 @@ else()
+                                                     FFMPEG_LIBAVUTIL
+                                                     FFMPEG_LIBSWSCALE
+                                                     FFMPEG_LIBSWRESAMPLE
+-                                                    FFMPEG_LIBPOSTPROC
+                                                     FFMPEG_VERSION
+                                       FAIL_MESSAGE "FFmpeg ${REQUIRED_FFMPEG_VERSION} not found, please consider using -DENABLE_INTERNAL_FFMPEG=ON")
+ 
+@@ -288,6 +293,10 @@ else()
+       ffmpeg_create_target(${_libname})
+     endforeach()
+ 
++    if (FFMPEG_LIBPOSTPROC)
++      ffmpeg_create_target(libpostproc)
++    endif()
++
+   else()
+     if(FFMPEG_PATH)
+       message(FATAL_ERROR "FFmpeg not found, please consider using -DENABLE_INTERNAL_FFMPEG=ON")
+@@ -314,7 +323,10 @@ if(FFMPEG_FOUND)
+   target_link_libraries(ffmpeg::ffmpeg INTERFACE ffmpeg::libavutil)
+   target_link_libraries(ffmpeg::ffmpeg INTERFACE ffmpeg::libswscale)
+   target_link_libraries(ffmpeg::ffmpeg INTERFACE ffmpeg::libswresample)
+-  target_link_libraries(ffmpeg::ffmpeg INTERFACE ffmpeg::libpostproc)
++  if (TARGET ffmpeg::libpostproc)
++    set_property(TARGET ffmpeg::libpostproc APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS HAVE_LIBPOSTPROC)
++    target_link_libraries(ffmpeg::ffmpeg INTERFACE ffmpeg::libpostproc)
++  endif()
+ 
+   if(TARGET ffmpeg)
+     add_dependencies(ffmpeg::ffmpeg ffmpeg)
+--- a/xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.cpp
++++ b/xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.cpp
+@@ -339,15 +339,6 @@ int CAEEncoderFFmpeg::Encode(uint8_t *in
+   return size;
+ }
+ 
+-int CAEEncoderFFmpeg::GetData(uint8_t **data)
+-{
+-  int size;
+-  *data = m_Buffer;
+-  size = m_BufferSize;
+-  m_BufferSize = 0;
+-  return size;
+-}
+-
+ double CAEEncoderFFmpeg::GetDelay(unsigned int bufferSize)
+ {
+   if (!m_CodecCtx)
+--- a/xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.h
++++ b/xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.h
+@@ -31,8 +31,7 @@ public:
+   AVCodecID GetCodecID() override;
+   unsigned int GetFrames() override;
+ 
+-  int Encode(uint8_t *in, int in_size, uint8_t *out, int out_size) override;
+-  int GetData(uint8_t **data) override;
++  int Encode(uint8_t* in, int in_size, uint8_t* out, int out_size) override;
+   double GetDelay(unsigned int bufferSize) override;
+ private:
+   unsigned int BuildChannelLayout(const int64_t ffmap, CAEChannelInfo& layout);
+@@ -44,7 +43,6 @@ private:
+   AVCodecContext *m_CodecCtx;
+   SwrContext *m_SwrCtx;
+   CAEChannelInfo m_Layout;
+-  uint8_t m_Buffer[8 + AV_INPUT_BUFFER_MIN_SIZE];
+   int m_BufferSize = 0;
+   int m_OutputSize = 0;
+   double m_OutputRatio = 0.0;
+--- a/xbmc/cores/AudioEngine/Interfaces/AEEncoder.h
++++ b/xbmc/cores/AudioEngine/Interfaces/AEEncoder.h
+@@ -79,13 +79,6 @@ public:
+   virtual int Encode (uint8_t *in, int in_size, uint8_t *out, int out_size) = 0;
+ 
+   /**
+-   * Get the encoded data
+-   * @param data return pointer to the buffer with the current encoded block
+-   * @return the size in bytes of *data
+-   */
+-  virtual int GetData(uint8_t **data) = 0;
+-
+-  /**
+    * Get the delay in seconds
+    * @param bufferSize how much encoded data the caller has buffered to add to the delay
+    * @return the delay in seconds including any un-fetched encoded data
+--- a/xbmc/cores/FFmpeg.h
++++ b/xbmc/cores/FFmpeg.h
+@@ -12,14 +12,14 @@
+ #include "ServiceBroker.h"
+ #include "utils/StringUtils.h"
+ 
+-extern "C" {
++extern "C"
++{
+ #include <libavcodec/avcodec.h>
++#include <libavfilter/avfilter.h>
+ #include <libavformat/avformat.h>
+ #include <libavutil/avutil.h>
+-#include <libavutil/log.h>
+ #include <libavutil/ffversion.h>
+-#include <libavfilter/avfilter.h>
+-#include <libpostproc/postprocess.h>
++#include <libavutil/log.h>
+ }
+ 
+ #include <tuple>
+--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/CMakeLists.txt
++++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/CMakeLists.txt
+@@ -4,9 +4,10 @@ set(SOURCES AddonVideoCodec.cpp
+ 
+ set(HEADERS AddonVideoCodec.h
+             DVDVideoCodec.h
+-            DVDVideoCodecFFmpeg.h)
++            DVDVideoCodecFFmpeg.h
++            DVDVideoPP.h)
+ 
+-if(NOT ENABLE_EXTERNAL_LIBAV)
++if(TARGET ffmpeg::libpostproc)
+   list(APPEND SOURCES DVDVideoPPFFmpeg.cpp)
+   list(APPEND HEADERS DVDVideoPPFFmpeg.h)
+ endif()
+--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp
++++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp
+@@ -412,16 +412,16 @@ bool CDVDVideoCodecAndroidMediaCodec::Op
+     case AV_CODEC_ID_VP9:
+       switch (m_hints.profile)
+       {
+-        case FF_PROFILE_VP9_0:
++        case AV_PROFILE_VP9_0:
+           profile = CJNIMediaCodecInfoCodecProfileLevel::VP9Profile0;
+           break;
+-        case FF_PROFILE_VP9_1:
++        case AV_PROFILE_VP9_1:
+           profile = CJNIMediaCodecInfoCodecProfileLevel::VP9Profile1;
+           break;
+-        case FF_PROFILE_VP9_2:
++        case AV_PROFILE_VP9_2:
+           profile = CJNIMediaCodecInfoCodecProfileLevel::VP9Profile2;
+           break;
+-        case FF_PROFILE_VP9_3:
++        case AV_PROFILE_VP9_3:
+           profile = CJNIMediaCodecInfoCodecProfileLevel::VP9Profile3;
+           break;
+         default:;
+@@ -435,33 +435,33 @@ bool CDVDVideoCodecAndroidMediaCodec::Op
+     case AV_CODEC_ID_H264:
+       switch (m_hints.profile)
+       {
+-        case FF_PROFILE_H264_BASELINE:
++        case AV_PROFILE_H264_BASELINE:
+           profile = CJNIMediaCodecInfoCodecProfileLevel::AVCProfileBaseline;
+           break;
+-        case FF_PROFILE_H264_MAIN:
++        case AV_PROFILE_H264_MAIN:
+           profile = CJNIMediaCodecInfoCodecProfileLevel::AVCProfileMain;
+           break;
+-        case FF_PROFILE_H264_EXTENDED:
++        case AV_PROFILE_H264_EXTENDED:
+           profile = CJNIMediaCodecInfoCodecProfileLevel::AVCProfileExtended;
+           break;
+-        case FF_PROFILE_H264_HIGH:
++        case AV_PROFILE_H264_HIGH:
+           profile = CJNIMediaCodecInfoCodecProfileLevel::AVCProfileHigh;
+           break;
+-        case FF_PROFILE_H264_HIGH_10:
++        case AV_PROFILE_H264_HIGH_10:
+           profile = CJNIMediaCodecInfoCodecProfileLevel::AVCProfileHigh10;
+           break;
+-        case FF_PROFILE_H264_HIGH_422:
++        case AV_PROFILE_H264_HIGH_422:
+           profile = CJNIMediaCodecInfoCodecProfileLevel::AVCProfileHigh422;
+           break;
+-        case FF_PROFILE_H264_HIGH_444:
++        case AV_PROFILE_H264_HIGH_444:
+           profile = CJNIMediaCodecInfoCodecProfileLevel::AVCProfileHigh444;
+           break;
+         // All currently not supported formats
+-        case FF_PROFILE_H264_HIGH_10_INTRA:
+-        case FF_PROFILE_H264_HIGH_422_INTRA:
+-        case FF_PROFILE_H264_HIGH_444_PREDICTIVE:
+-        case FF_PROFILE_H264_HIGH_444_INTRA:
+-        case FF_PROFILE_H264_CAVLC_444:
++        case AV_PROFILE_H264_HIGH_10_INTRA:
++        case AV_PROFILE_H264_HIGH_422_INTRA:
++        case AV_PROFILE_H264_HIGH_444_PREDICTIVE:
++        case AV_PROFILE_H264_HIGH_444_INTRA:
++        case AV_PROFILE_H264_CAVLC_444:
+           goto FAIL;
+         default:
+           break;
+@@ -483,16 +483,16 @@ bool CDVDVideoCodecAndroidMediaCodec::Op
+     {
+       switch (m_hints.profile)
+       {
+-        case FF_PROFILE_HEVC_MAIN:
++        case AV_PROFILE_HEVC_MAIN:
+           profile = CJNIMediaCodecInfoCodecProfileLevel::HEVCProfileMain;
+           break;
+-        case FF_PROFILE_HEVC_MAIN_10:
++        case AV_PROFILE_HEVC_MAIN_10:
+           profile = CJNIMediaCodecInfoCodecProfileLevel::HEVCProfileMain10;
+           break;
+-        case FF_PROFILE_HEVC_MAIN_STILL_PICTURE:
++        case AV_PROFILE_HEVC_MAIN_STILL_PICTURE:
+           profile = CJNIMediaCodecInfoCodecProfileLevel::HEVCProfileMainStill;
+           break;
+-        case FF_PROFILE_HEVC_REXT:
++        case AV_PROFILE_HEVC_REXT:
+           // No known h/w decoder supporting Hi10P
+           goto FAIL;
+         default:
+@@ -681,11 +681,11 @@ bool CDVDVideoCodecAndroidMediaCodec::Op
+     {
+       switch (m_hints.profile)
+       {
+-        case FF_PROFILE_AV1_MAIN:
++        case AV_PROFILE_AV1_MAIN:
+           profile = CJNIMediaCodecInfoCodecProfileLevel::AV1ProfileMain8;
+           break;
+-        case FF_PROFILE_AV1_HIGH:
+-        case FF_PROFILE_AV1_PROFESSIONAL:
++        case AV_PROFILE_AV1_HIGH:
++        case AV_PROFILE_AV1_PROFESSIONAL:
+           goto FAIL;
+           break;
+         default:
+--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
++++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
+@@ -547,11 +547,11 @@ void CDVDVideoCodecDRMPRIME::SetPictureP
+ 
+   pVideoPicture->colorBits = 8;
+   if (m_pCodecContext->codec_id == AV_CODEC_ID_HEVC &&
+-      m_pCodecContext->profile == FF_PROFILE_HEVC_MAIN_10)
++      m_pCodecContext->profile == AV_PROFILE_HEVC_MAIN_10)
+     pVideoPicture->colorBits = 10;
+   else if (m_pCodecContext->codec_id == AV_CODEC_ID_H264 &&
+-           (m_pCodecContext->profile == FF_PROFILE_H264_HIGH_10 ||
+-            m_pCodecContext->profile == FF_PROFILE_H264_HIGH_10_INTRA))
++           (m_pCodecContext->profile == AV_PROFILE_H264_HIGH_10 ||
++            m_pCodecContext->profile == AV_PROFILE_H264_HIGH_10_INTRA))
+     pVideoPicture->colorBits = 10;
+ 
+   pVideoPicture->hasDisplayMetadata = false;
+--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
++++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
+@@ -11,6 +11,9 @@
+ #include "DVDCodecs/DVDCodecs.h"
+ #include "DVDCodecs/DVDFactoryCodec.h"
+ #include "DVDStreamInfo.h"
++#ifdef HAVE_LIBPOSTPROC
++#include "DVDVideoPPFFmpeg.h"
++#endif
+ #include "ServiceBroker.h"
+ #include "cores/FFmpeg.h"
+ #include "cores/VideoPlayer/Interface/TimingConstants.h"
+@@ -307,8 +310,11 @@ enum AVPixelFormat CDVDVideoCodecFFmpeg:
+ 
+ CDVDVideoCodecFFmpeg::CDVDVideoCodecFFmpeg(CProcessInfo& processInfo)
+   : CDVDVideoCodec(processInfo),
+-    m_videoBufferPool(std::make_shared<CVideoBufferPoolFFmpeg>()),
+-    m_postProc(processInfo)
++    m_videoBufferPool(std::make_shared<CVideoBufferPoolFFmpeg>())
++#ifdef HAVE_LIBPOSTPROC
++    ,
++    m_postProc(std::make_unique<CDVDVideoPPFFmpeg>(processInfo))
++#endif
+ {
+   m_decoderState = STATE_NONE;
+ }
+@@ -335,7 +341,9 @@ bool CDVDVideoCodecFFmpeg::Open(CDVDStre
+ 
+   m_formats.clear();
+   m_formats = m_processInfo.GetPixFormats();
++#if LIBAVFILTER_BUILD < AV_VERSION_INT(10, 6, 100)
+   m_formats.push_back(AV_PIX_FMT_NONE); /* always add none to get a terminated list in ffmpeg world */
++#endif
+   m_processInfo.SetSwDeinterlacingMethods();
+   m_processInfo.SetVideoInterlaced(false);
+ 
+@@ -916,10 +924,12 @@ bool CDVDVideoCodecFFmpeg::SetPicturePar
+   buffer->SetRef(m_pFrame);
+   pVideoPicture->videoBuffer = buffer;
+ 
+-  if (m_processInfo.GetVideoSettings().m_PostProcess)
++  if (m_postProc && m_processInfo.GetVideoSettings().m_PostProcess)
+   {
+-    m_postProc.SetType(CServiceBroker::GetSettingsComponent()->GetAdvancedSettings()->m_videoPPFFmpegPostProc, false);
+-    m_postProc.Process(pVideoPicture);
++    m_postProc->SetType(
++        CServiceBroker::GetSettingsComponent()->GetAdvancedSettings()->m_videoPPFFmpegPostProc,
++        false);
++    m_postProc->Process(pVideoPicture);
+   }
+ 
+   return true;
+@@ -1179,7 +1189,7 @@ int CDVDVideoCodecFFmpeg::FilterOpen(con
+     return 0;
+   }
+ 
+-  if (!(m_pFilterGraph = avfilter_graph_alloc()))
++  if (!((m_pFilterGraph = avfilter_graph_alloc())))
+   {
+     CLog::Log(LOGERROR, "CDVDVideoCodecFFmpeg::FilterOpen - unable to alloc filter graph");
+     return -1;
+@@ -1196,20 +1206,29 @@ int CDVDVideoCodecFFmpeg::FilterOpen(con
+       m_pCodecContext->sample_aspect_ratio.num != 0 ? m_pCodecContext->sample_aspect_ratio.num : 1,
+       m_pCodecContext->sample_aspect_ratio.num != 0 ? m_pCodecContext->sample_aspect_ratio.den : 1);
+ 
+-  if ((result = avfilter_graph_create_filter(&m_pFilterIn, srcFilter, "src", args.c_str(), NULL, m_pFilterGraph)) < 0)
++  if (!((m_pFilterOut = avfilter_graph_alloc_filter(m_pFilterGraph, outFilter, "out"))))
+   {
+-    CLog::Log(LOGERROR, "CDVDVideoCodecFFmpeg::FilterOpen - avfilter_graph_create_filter: src");
++    CLog::LogF(LOGERROR, "unable to alloc filter out");
++    return -1;
++  }
++
++  if ((result = av_opt_set_array(m_pFilterOut, "pixel_formats", AV_OPT_SEARCH_CHILDREN, 0,
++                                 m_formats.size(), AV_OPT_TYPE_PIXEL_FMT, m_formats.data())) < 0)
++  {
++    CLog::LogF(LOGERROR, "failed setting pix formats");
+     return result;
+   }
+ 
+-  if ((result = avfilter_graph_create_filter(&m_pFilterOut, outFilter, "out", NULL, NULL, m_pFilterGraph)) < 0)
++  if ((result = avfilter_init_str(m_pFilterOut, nullptr) < 0))
+   {
+-    CLog::Log(LOGERROR, "CDVDVideoCodecFFmpeg::FilterOpen - avfilter_graph_create_filter: out");
++    CLog::Log(LOGERROR, "CDVDVideoCodecFFmpeg::FilterOpen - avfilter_init_str: out");
++    avfilter_free(m_pFilterOut);
+     return result;
+   }
+-  if ((result = av_opt_set_int_list(m_pFilterOut, "pix_fmts", &m_formats[0],  AV_PIX_FMT_NONE, AV_OPT_SEARCH_CHILDREN)) < 0)
++  if ((result = avfilter_graph_create_filter(&m_pFilterIn, srcFilter, "src", args.c_str(), NULL,
++                                             m_pFilterGraph)) < 0)
+   {
+-    CLog::Log(LOGERROR, "CDVDVideoCodecFFmpeg::FilterOpen - failed settings pix formats");
++    CLog::Log(LOGERROR, "CDVDVideoCodecFFmpeg::FilterOpen - avfilter_graph_create_filter: src");
+     return result;
+   }
+ 
+--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.h
++++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.h
+@@ -8,20 +8,22 @@
+ 
+ #pragma once
+ 
++#include "DVDVideoCodec.h"
++#include "DVDVideoPP.h"
+ #include "cores/VideoPlayer/DVDCodecs/DVDCodecs.h"
+ #include "cores/VideoPlayer/DVDStreamInfo.h"
+-#include "DVDVideoCodec.h"
+-#include "DVDVideoPPFFmpeg.h"
++
++#include <memory>
+ #include <string>
+ #include <vector>
+ 
+-extern "C" {
+-#include <libavfilter/avfilter.h>
++extern "C"
++{
+ #include <libavcodec/avcodec.h>
++#include <libavfilter/avfilter.h>
+ #include <libavformat/avformat.h>
+ #include <libavutil/avutil.h>
+ #include <libswscale/swscale.h>
+-#include <libpostproc/postprocess.h>
+ }
+ 
+ class CVideoBufferPoolFFmpeg;
+@@ -73,7 +75,7 @@ protected:
+   bool m_filterEof = false;
+   bool m_eof = false;
+ 
+-  CDVDVideoPPFFmpeg m_postProc;
++  std::unique_ptr<IDVDVideoPP> m_postProc;
+ 
+   int m_iPictureWidth = 0;
+   int m_iPictureHeight = 0;
+--- /dev/null
++++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoPP.h
+@@ -0,0 +1,23 @@
++/*
++ *  Copyright (C) 2025 Team Kodi
++ *  This file is part of Kodi - https://kodi.tv
++ *
++ *  SPDX-License-Identifier: GPL-2.0-or-later
++ *  See LICENSES/README.md for more information.
++ */
++
++#pragma once
++
++#include <string>
++
++class CProcessInfo;
++struct VideoPicture;
++
++class IDVDVideoPP
++{
++public:
++  virtual ~IDVDVideoPP() = default;
++
++  virtual void SetType(const std::string& mType, bool deinterlace) = 0;
++  virtual void Process(VideoPicture* picture) = 0;
++};
+--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoPPFFmpeg.h
++++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoPPFFmpeg.h
+@@ -9,20 +9,26 @@
+ #pragma once
+ 
+ #include "DVDVideoCodec.h"
++#include "DVDVideoPP.h"
++
++extern "C"
++{
++#include <libpostproc/postprocess.h>
++}
+ 
+ #include <string>
+ 
+ class CProcessInfo;
+ 
+-class CDVDVideoPPFFmpeg
++class CDVDVideoPPFFmpeg : public IDVDVideoPP
+ {
+ public:
+ 
+   explicit CDVDVideoPPFFmpeg(CProcessInfo &processInfo);
+-  ~CDVDVideoPPFFmpeg();
++  ~CDVDVideoPPFFmpeg() override;
+ 
+-  void SetType(const std::string& mType, bool deinterlace);
+-  void Process(VideoPicture *pPicture);
++  void SetType(const std::string& mType, bool deinterlace) override;
++  void Process(VideoPicture* picture) override;
+ 
+ protected:
+   std::string m_sType;
+--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/VAAPI.cpp
++++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/VAAPI.cpp
+@@ -609,7 +609,7 @@ bool CDecoder::Open(AVCodecContext* avct
+       break;
+     case AV_CODEC_ID_H264:
+     {
+-      if (avctx->profile == FF_PROFILE_H264_CONSTRAINED_BASELINE)
++      if (avctx->profile == AV_PROFILE_H264_CONSTRAINED_BASELINE)
+       {
+         profile = VAProfileH264ConstrainedBaseline;
+         if (!m_vaapiConfig.context->SupportsProfile(profile))
+@@ -617,7 +617,7 @@ bool CDecoder::Open(AVCodecContext* avct
+       }
+       else
+       {
+-        if(avctx->profile == FF_PROFILE_H264_MAIN)
++        if (avctx->profile == AV_PROFILE_H264_MAIN)
+         {
+           profile = VAProfileH264Main;
+           if (m_vaapiConfig.context->SupportsProfile(profile))
+@@ -631,14 +631,14 @@ bool CDecoder::Open(AVCodecContext* avct
+     }
+     case AV_CODEC_ID_HEVC:
+     {
+-      if (avctx->profile == FF_PROFILE_HEVC_MAIN_10)
++      if (avctx->profile == AV_PROFILE_HEVC_MAIN_10)
+       {
+         if (!m_capDeepColor)
+           return false;
+ 
+         profile = VAProfileHEVCMain10;
+       }
+-      else if (avctx->profile == FF_PROFILE_HEVC_MAIN)
++      else if (avctx->profile == AV_PROFILE_HEVC_MAIN)
+         profile = VAProfileHEVCMain;
+       else
+         profile = VAProfileNone;
+@@ -655,9 +655,9 @@ bool CDecoder::Open(AVCodecContext* avct
+     }
+     case AV_CODEC_ID_VP9:
+     {
+-      if (avctx->profile == FF_PROFILE_VP9_0)
++      if (avctx->profile == AV_PROFILE_VP9_0)
+         profile = VAProfileVP9Profile0;
+-      else if (avctx->profile == FF_PROFILE_VP9_2)
++      else if (avctx->profile == AV_PROFILE_VP9_2)
+         profile = VAProfileVP9Profile2;
+       else
+         profile = VAProfileNone;
+@@ -678,9 +678,9 @@ bool CDecoder::Open(AVCodecContext* avct
+ #if VA_CHECK_VERSION(1, 8, 0)
+     case AV_CODEC_ID_AV1:
+     {
+-      if (avctx->profile == FF_PROFILE_AV1_MAIN)
++      if (avctx->profile == AV_PROFILE_AV1_MAIN)
+         profile = VAProfileAV1Profile0;
+-      else if (avctx->profile == FF_PROFILE_AV1_HIGH)
++      else if (avctx->profile == AV_PROFILE_AV1_HIGH)
+         profile = VAProfileAV1Profile1;
+       else
+         profile = VAProfileNone;
+@@ -2969,19 +2969,33 @@ bool CFFmpegPostproc::Init(EINTERLACEMET
+     return false;
+   }
+ 
+-  if (avfilter_graph_create_filter(&m_pFilterOut, outFilter, "out", NULL, NULL, m_pFilterGraph) < 0)
++  if (!((m_pFilterOut = avfilter_graph_alloc_filter(m_pFilterGraph, outFilter, "out"))))
+   {
+-    CLog::Log(LOGERROR, "CFFmpegPostproc::Init  - avfilter_graph_create_filter: out");
++    CLog::LogF(LOGERROR, "unable to alloc filter out");
+     return false;
+   }
+ 
++#if LIBAVFILTER_BUILD >= AV_VERSION_INT(10, 6, 100)
++  constexpr std::array<AVPixelFormat, 1> pixFmts = {{AV_PIX_FMT_NV12}};
++  if (av_opt_set_array(m_pFilterOut, "pixel_formats", AV_OPT_SEARCH_CHILDREN, 0, pixFmts.size(),
++                       AV_OPT_TYPE_PIXEL_FMT, pixFmts.data()) < 0)
++#else
+   enum AVPixelFormat pix_fmts[] = { AV_PIX_FMT_NV12, AV_PIX_FMT_NONE };
+-  if (av_opt_set_int_list(m_pFilterOut, "pix_fmts", pix_fmts,  AV_PIX_FMT_NONE, AV_OPT_SEARCH_CHILDREN) < 0)
++  if (av_opt_set_int_list(m_pFilterOut, "pix_fmts", pix_fmts, AV_PIX_FMT_NONE,
++                          AV_OPT_SEARCH_CHILDREN) < 0)
++#endif
+   {
+     CLog::Log(LOGERROR, "VAAPI::CFFmpegPostproc::Init  - failed settings pix formats");
+     return false;
+   }
+ 
++  if (avfilter_init_str(m_pFilterOut, nullptr) < 0)
++  {
++    CLog::LogF(LOGERROR, "failed to initialize filter out");
++    avfilter_free(m_pFilterOut);
++    return false;
++  }
++
+   AVFilterInOut* outputs = avfilter_inout_alloc();
+   AVFilterInOut* inputs  = avfilter_inout_alloc();
+ 
+@@ -3096,7 +3110,6 @@ bool CFFmpegPostproc::AddPicture(CVaapiD
+   m_pFilterFrameIn->linesize[1] = image.pitches[1];
+   m_pFilterFrameIn->data[2] = NULL;
+   m_pFilterFrameIn->data[3] = NULL;
+-  m_pFilterFrameIn->pkt_size = image.data_size;
+ 
+   CheckSuccess(vaUnmapBuffer(m_config.dpy, image.buf), "vaUnmapBuffer");
+   CheckSuccess(vaDestroyImage(m_config.dpy, image.image_id), "vaDestroyImage");
+--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/VDPAU.cpp
++++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/VDPAU.cpp
+@@ -922,7 +922,7 @@ bool CDecoder::ConfigVDPAU(AVCodecContex
+   }
+   else if (avctx->codec_id == AV_CODEC_ID_VP9)
+   {
+-    if (avctx->profile != FF_PROFILE_VP9_0)
++    if (avctx->profile != AV_PROFILE_VP9_0)
+       return false;
+ 
+     m_vdpauConfig.maxReferences = 8;
+--- a/xbmc/cores/VideoPlayer/VideoPlayer.cpp
++++ b/xbmc/cores/VideoPlayer/VideoPlayer.cpp
+@@ -5076,6 +5076,10 @@ bool CVideoPlayer::Supports(ESCALINGMETH
+ 
+ bool CVideoPlayer::Supports(ERENDERFEATURE feature) const
+ {
++#ifndef HAVE_LIBPOSTPROC
++  if (feature == ERENDERFEATURE::RENDERFEATURE_POSTPROCESS)
++    return false;
++#endif
+   return m_renderManager.Supports(feature);
+ }
+ 
diff -Nru kodi-21.3+dfsg/debian/patches/series kodi-21.3+dfsg/debian/patches/series
--- kodi-21.3+dfsg/debian/patches/series	2025-11-08 12:19:48.000000000 +0200
+++ kodi-21.3+dfsg/debian/patches/series	2026-05-03 12:41:20.000000000 +0300
@@ -24,3 +24,6 @@
 workarounds/0002-xbmc-libdvd_vfs-enen92.patch
 workarounds/0003-pcre2.patch
 workarounds/0004-ffmpeg7.patch
+26471.patch
+26996.patch
+27149.patch

Reply via email to