From aa187f62d6ef55f990fbe245d03f73c9b96ed5aa Mon Sep 17 00:00:00 2001 From: Bernd Kuhls Date: Sun, 22 Jun 2025 11:41:13 +0200 Subject: [PATCH] package/minidlna: Fix build with ffmpeg-7.0 Signed-off-by: Bernd Kuhls Signed-off-by: Julien Olivain --- ...01-libav.h-fix-build-with-ffmpeg-7.0.patch | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 package/minidlna/0001-libav.h-fix-build-with-ffmpeg-7.0.patch diff --git a/package/minidlna/0001-libav.h-fix-build-with-ffmpeg-7.0.patch b/package/minidlna/0001-libav.h-fix-build-with-ffmpeg-7.0.patch new file mode 100644 index 0000000000..888c867f36 --- /dev/null +++ b/package/minidlna/0001-libav.h-fix-build-with-ffmpeg-7.0.patch @@ -0,0 +1,48 @@ +From 5f698d645d71782c78e6495efd3b5e982f7db8c4 Mon Sep 17 00:00:00 2001 +From: Bernd Kuhls +Date: Sat, 13 Apr 2024 15:03:34 +0200 +Subject: [PATCH] libav.h: fix build with ffmpeg 7.0 + +The old bitmask-based channel layout API was removed: +https://git.videolan.org/?p=ffmpeg.git;a=blob_plain;f=doc/APIchanges;hb=n7.0 + +Upstream: https://sourceforge.net/p/minidlna/patches/204/ + +Signed-off-by: Bernd Kuhls +--- + libav.h | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/libav.h b/libav.h +index b69752c..d5a3358 100644 +--- a/libav.h ++++ b/libav.h +@@ -174,7 +174,12 @@ lav_get_interlaced(AVStream *s) + #define lav_codec_tag(s) s->codecpar->codec_tag + #define lav_sample_rate(s) s->codecpar->sample_rate + #define lav_bit_rate(s) s->codecpar->bit_rate ++#if LIBAVCODEC_VERSION_MAJOR > 52 || \ ++ (LIBAVCODEC_VERSION_MAJOR >= 52 && LIBAVCODEC_VERSION_MINOR >= 113) ++#define lav_channels(s) s->codecpar->ch_layout.nb_channels ++#else + #define lav_channels(s) s->codecpar->channels ++#endif + #define lav_width(s) s->codecpar->width + #define lav_height(s) s->codecpar->height + #define lav_profile(s) s->codecpar->profile +@@ -186,7 +191,12 @@ lav_get_interlaced(AVStream *s) + #define lav_codec_tag(s) s->codec->codec_tag + #define lav_sample_rate(s) s->codec->sample_rate + #define lav_bit_rate(s) s->codec->bit_rate ++#if LIBAVCODEC_VERSION_MAJOR > 52 || \ ++ (LIBAVCODEC_VERSION_MAJOR >= 52 && LIBAVCODEC_VERSION_MINOR >= 113) ++#define lav_channels(s) s->codec->ch_layout.nb_channels ++#else + #define lav_channels(s) s->codec->channels ++#endif + #define lav_width(s) s->codec->width + #define lav_height(s) s->codec->height + #define lav_profile(s) s->codec->profile +-- +2.39.2 +