diff --git a/build/minidlna/patches/ffmpeg_7.patch b/build/minidlna/patches/ffmpeg_7.patch deleted file mode 100644 index c5a171758..000000000 --- a/build/minidlna/patches/ffmpeg_7.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -wpruN --no-dereference '--exclude=*.orig' a~/libav.h a/libav.h ---- a~/libav.h 1970-01-01 00:00:00 -+++ a/libav.h 1970-01-01 00:00:00 -@@ -174,7 +174,7 @@ 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 --#define lav_channels(s) s->codecpar->channels -+#define lav_channels(s) s->codecpar->ch_layout.nb_channels - #define lav_width(s) s->codecpar->width - #define lav_height(s) s->codecpar->height - #define lav_profile(s) s->codecpar->profile -@@ -186,7 +186,7 @@ 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 --#define lav_channels(s) s->codec->channels -+#define lav_channels(s) s->codec->ch_layout.nb_channels - #define lav_width(s) s->codec->width - #define lav_height(s) s->codec->height - #define lav_profile(s) s->codec->profile diff --git a/build/minidlna/patches/libavformat_61.patch b/build/minidlna/patches/libavformat_61.patch new file mode 100644 index 000000000..07efa4508 --- /dev/null +++ b/build/minidlna/patches/libavformat_61.patch @@ -0,0 +1,15 @@ +diff -wpruN --no-dereference '--exclude=*.orig' a~/libav.h a/libav.h +--- a~/libav.h 1970-01-01 00:00:00 ++++ a/libav.h 1970-01-01 00:00:00 +@@ -174,7 +174,11 @@ 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 LIBAVFORMAT_VERSION_MAJOR >= 61 ++#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 diff --git a/build/minidlna/patches/series b/build/minidlna/patches/series index 446db01ce..15ea705a5 100644 --- a/build/minidlna/patches/series +++ b/build/minidlna/patches/series @@ -4,4 +4,4 @@ minissdp.c.patch monitor.c.patch icons.c.patch select_use_after_free.patch -ffmpeg_7.patch +libavformat_61.patch