mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-05-02 00:02:55 +02:00
- From ffmpeg-7.0 the channel_layout variable has been changed to ch_layout. A minidlna user has submitted a patch to minidlna in May 2024 to fix this. Without this patch minidlna fails to build with ffmpeg-7.0 onwards. - The patch has not yet been merged with minidlna (last commit was in May 2023) so I have taken the patch and applied it to the minidlna source tarball. - Update of rootfile not required Signed-off-by: Adolf Belka <adolf.belka@ipfire.org> Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
24 lines
764 B
Diff
24 lines
764 B
Diff
--- minidlna-1.3.3/libav.h.orig 2023-05-31 10:25:59.000000000 +0200
|
|
+++ minidlna-1.3.3/libav.h 2024-08-21 15:34:14.374621920 +0200
|
|
@@ -117,6 +117,8 @@
|
|
# endif
|
|
#endif
|
|
|
|
+#define HAVE_CH_LAYOUT (LIBAVUTIL_VERSION_INT >= ((57<<16)+(28<<8)+100))
|
|
+
|
|
static inline int
|
|
lav_open(AVFormatContext **ctx, const char *filename)
|
|
{
|
|
@@ -174,7 +176,11 @@
|
|
#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 HAVE_CH_LAYOUT
|
|
+#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
|