[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1115051: kodi-inputstream-ffmpegdirect: diff for NMU version 21.3.8+ds-1.1



Control: tags 1115051 + patch
Control: tags 1115051 + pending

Dear maintainer,

I've prepared an NMU for kodi-inputstream-ffmpegdirect (versioned as 21.3.8+ds-1.1)
and uploaded it to DELAYED/2. Please feel free to tell me if I should 
cancel it.

cu
Adrian
diffstat for kodi-inputstream-ffmpegdirect-21.3.8+ds kodi-inputstream-ffmpegdirect-21.3.8+ds

 changelog                                    |    7 +
 control                                      |    1 
 patches/0001-depends-switch-to-ffmpeg8.patch |  162 +++++++++++++++++++++++++++
 patches/series                               |    1 
 4 files changed, 170 insertions(+), 1 deletion(-)

diff -Nru kodi-inputstream-ffmpegdirect-21.3.8+ds/debian/changelog kodi-inputstream-ffmpegdirect-21.3.8+ds/debian/changelog
--- kodi-inputstream-ffmpegdirect-21.3.8+ds/debian/changelog	2025-10-10 09:40:00.000000000 +0300
+++ kodi-inputstream-ffmpegdirect-21.3.8+ds/debian/changelog	2026-01-04 19:13:22.000000000 +0200
@@ -1,3 +1,10 @@
+kodi-inputstream-ffmpegdirect (21.3.8+ds-1.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Backport upstream fix for FTBFS with FFmpeg 8. (Closes: #1115051)
+
+ -- Adrian Bunk <bunk@debian.org>  Sun, 04 Jan 2026 19:13:22 +0200
+
 kodi-inputstream-ffmpegdirect (21.3.8+ds-1) unstable; urgency=high
 
   * New upstream version 21.3.8+ds
diff -Nru kodi-inputstream-ffmpegdirect-21.3.8+ds/debian/control kodi-inputstream-ffmpegdirect-21.3.8+ds/debian/control
--- kodi-inputstream-ffmpegdirect-21.3.8+ds/debian/control	2025-10-10 09:40:00.000000000 +0300
+++ kodi-inputstream-ffmpegdirect-21.3.8+ds/debian/control	2026-01-04 19:13:22.000000000 +0200
@@ -11,7 +11,6 @@
  libavformat-dev,
  libavutil-dev,
  libbz2-dev,
- libpostproc-dev,
  libswresample-dev,
  libswscale-dev,
  libz3-dev,
diff -Nru kodi-inputstream-ffmpegdirect-21.3.8+ds/debian/patches/0001-depends-switch-to-ffmpeg8.patch kodi-inputstream-ffmpegdirect-21.3.8+ds/debian/patches/0001-depends-switch-to-ffmpeg8.patch
--- kodi-inputstream-ffmpegdirect-21.3.8+ds/debian/patches/0001-depends-switch-to-ffmpeg8.patch	1970-01-01 02:00:00.000000000 +0200
+++ kodi-inputstream-ffmpegdirect-21.3.8+ds/debian/patches/0001-depends-switch-to-ffmpeg8.patch	2026-01-04 19:13:22.000000000 +0200
@@ -0,0 +1,162 @@
+From 89d8fa928d1f38c4f542d3b29bd43e36dd8f394e Mon Sep 17 00:00:00 2001
+From: Frank Howie <howie-f@kodi.tv>
+Date: Sun, 12 Oct 2025 17:33:45 +0200
+Subject: [depends] switch to ffmpeg8
+
+- refresh patches
+- add patch to merge libpostproc in which is a plugin now
+- remove "enable-postproc" / add "disable-muxer=whip" configure options
+- change identifiers to their AV_... equivalents
+  - FF_PROFILE_UNKNOWN
+  - FF_LEVEL_UNKNOWN
+  - FF_MAX_EXTRADATA_SIZE
+  - FF_PROFILE_DTS_HD_MA
+  - FF_PROFILE_DTS_HD_HRA
+---
+ FindFFMPEG.cmake            | 22 ++++++----------------
+ src/stream/DemuxStream.h    |  4 ++--
+ src/stream/FFmpegStream.cpp |  8 ++++----
+ 3 files changed, 12 insertions(+), 22 deletions(-)
+
+diff --git a/FindFFMPEG.cmake b/FindFFMPEG.cmake
+index 8b20538..8d55190 100644
+--- a/FindFFMPEG.cmake
++++ b/FindFFMPEG.cmake
+@@ -33,12 +33,11 @@
+ #
+ 
+ # required ffmpeg library versions
+-set(REQUIRED_FFMPEG_VERSION 7.0.0)
++set(REQUIRED_FFMPEG_VERSION 8.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")
+ 
+@@ -54,7 +53,6 @@ if(WITH_FFMPEG)
+   unset(_avutil_ver)
+   unset(_swscale_ver)
+   unset(_swresample_ver)
+-  unset(_postproc_ver)
+ endif()
+ 
+ # Allows building with external ffmpeg not found in system paths,
+@@ -75,7 +73,7 @@ if(NOT ENABLE_INTERNAL_FFMPEG OR KODI_DEPENDSBUILD)
+                   libavutil${_avutil_ver}
+                   libswscale${_swscale_ver}
+                   libswresample${_swresample_ver}
+-                  libpostproc${_postproc_ver})
++                  )
+ 
+   if(PKG_CONFIG_FOUND)
+     pkg_check_modules(PC_FFMPEG ${FFMPEG_PKGS} QUIET)
+@@ -83,12 +81,12 @@ if(NOT ENABLE_INTERNAL_FFMPEG OR KODI_DEPENDSBUILD)
+   endif()
+ 
+   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
+             PATHS ${PC_FFMPEG_INCLUDE_DIRS}
+             NO_DEFAULT_PATH)
+   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)
+ 
+   find_library(FFMPEG_LIBAVCODEC
+                NAMES avcodec libavcodec
+@@ -132,13 +130,6 @@ if(NOT ENABLE_INTERNAL_FFMPEG OR KODI_DEPENDSBUILD)
+                NO_DEFAULT_PATH)
+   find_library(FFMPEG_LIBSWRESAMPLE NAMES NAMES swresample libswresample PATH_SUFFIXES ffmpeg/libswresample)
+ 
+-  find_library(FFMPEG_LIBPOSTPROC
+-               NAMES postproc libpostproc
+-               PATH_SUFFIXES ffmpeg/libpostproc
+-               PATHS ${PC_FFMPEG_libpostproc_LIBDIR}
+-               NO_DEFAULT_PATH)
+-  find_library(FFMPEG_LIBPOSTPROC NAMES postproc libpostproc PATH_SUFFIXES ffmpeg/libpostproc)
+-
+   if((PC_FFMPEG_FOUND
+       AND PC_FFMPEG_libavcodec_VERSION
+       AND PC_FFMPEG_libavfilter_VERSION
+@@ -146,7 +137,7 @@ if(NOT ENABLE_INTERNAL_FFMPEG OR KODI_DEPENDSBUILD)
+       AND PC_FFMPEG_libavutil_VERSION
+       AND PC_FFMPEG_libswscale_VERSION
+       AND PC_FFMPEG_libswresample_VERSION
+-      AND PC_FFMPEG_libpostproc_VERSION)
++      )
+      OR WIN32)
+     set(FFMPEG_VERSION ${REQUIRED_FFMPEG_VERSION})
+ 
+@@ -161,7 +152,6 @@ if(NOT ENABLE_INTERNAL_FFMPEG OR KODI_DEPENDSBUILD)
+                                                     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")
+ 
+@@ -181,7 +171,7 @@ if(NOT ENABLE_INTERNAL_FFMPEG OR KODI_DEPENDSBUILD)
+     set(FFMPEG_LIBRARIES ${FFMPEG_LIBAVCODEC} ${FFMPEG_LIBAVFILTER}
+                          ${FFMPEG_LIBAVFORMAT} ${FFMPEG_LIBAVUTIL}
+                          ${FFMPEG_LIBSWSCALE} ${FFMPEG_LIBSWRESAMPLE}
+-                         ${FFMPEG_LIBPOSTPROC} ${FFMPEG_LDFLAGS})
++                         ${FFMPEG_LDFLAGS})
+     list(APPEND FFMPEG_DEFINITIONS -DFFMPEG_VER_SHA=\"${FFMPEG_VERSION}\")
+ 
+     # check if ffmpeg libs are statically linked
+diff --git a/src/stream/DemuxStream.h b/src/stream/DemuxStream.h
+index e66ecf0..00e071f 100644
+--- a/src/stream/DemuxStream.h
++++ b/src/stream/DemuxStream.h
+@@ -80,8 +80,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 = INPUTSTREAM_TYPE_NONE;
+     iDuration = 0;
+     pPrivate = NULL;
+diff --git a/src/stream/FFmpegStream.cpp b/src/stream/FFmpegStream.cpp
+index c77e09d..64838dd 100644
+--- a/src/stream/FFmpegStream.cpp
++++ b/src/stream/FFmpegStream.cpp
+@@ -1515,7 +1515,7 @@ bool FFmpegStream::SeekTime(double time, bool backwards, double* startpts)
+ 
+ FFmpegExtraData FFmpegStream::GetPacketExtradata(const AVPacket* pkt, const AVCodecParameters* codecPar)
+ {
+-  constexpr int FF_MAX_EXTRADATA_SIZE = ((1 << 28) - AV_INPUT_BUFFER_PADDING_SIZE);
++  constexpr int AV_MAX_EXTRADATA_SIZE = ((1 << 28) - AV_INPUT_BUFFER_PADDING_SIZE);
+ 
+   if (!pkt)
+     return {};
+@@ -1608,7 +1608,7 @@ FFmpegExtraData FFmpegStream::GetPacketExtradata(const AVPacket* pkt, const AVCo
+     size_t retExtraDataSize = 0;
+     uint8_t* retExtraData =
+         av_packet_get_side_data(pktRef, AV_PKT_DATA_NEW_EXTRADATA, &retExtraDataSize);
+-    if (retExtraData && retExtraDataSize > 0 && retExtraDataSize < FF_MAX_EXTRADATA_SIZE)
++    if (retExtraData && retExtraDataSize > 0 && retExtraDataSize < AV_MAX_EXTRADATA_SIZE)
+     {
+       try
+       {
+@@ -2260,9 +2260,9 @@ std::string FFmpegStream::GetStreamCodecName(int iStreamId)
+     /* 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";
+-- 
+2.30.2
+
diff -Nru kodi-inputstream-ffmpegdirect-21.3.8+ds/debian/patches/series kodi-inputstream-ffmpegdirect-21.3.8+ds/debian/patches/series
--- kodi-inputstream-ffmpegdirect-21.3.8+ds/debian/patches/series	2025-10-10 09:40:00.000000000 +0300
+++ kodi-inputstream-ffmpegdirect-21.3.8+ds/debian/patches/series	2026-01-04 19:13:22.000000000 +0200
@@ -1,2 +1,3 @@
 0000-ffmpeg7.patch
 0001-pr320.patch
+0001-depends-switch-to-ffmpeg8.patch

Reply to: