gentoo-ebuilds/net-misc/minidlna/files/minidlna-1.3.3-ffmpeg7.patch
Kostadin Shishmanov 9ad7a8e919
net-misc/minidlna: add patch to fix build with ffmpeg 7
With ffmpeg 7, the channels field that was previously deprecated with
ffmpeg 6 has been removed entirely, which breaks the build for this
package. The patch switches to the correct way of doing it now,
which is ch_layout.nb_channels.

Doesn't break building with ffmpeg 6.

Closes: https://bugs.gentoo.org/938728
Signed-off-by: Kostadin Shishmanov <kostadinshishmanov@protonmail.com>
Closes: https://github.com/gentoo/gentoo/pull/40459
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2025-02-26 19:56:13 +01:00

21 lines
865 B
Diff

https://bugs.gentoo.org/938728
https://sourceforge.net/p/minidlna/discussion/879956/thread/81e45c3d64
With ffmpeg 7, the channels field that was previously deprecated with
ffmpeg 6 has been removed entirely, which breaks the build for this
package. This patch switches to the correct way of doing it now,
which is ch_layout.nb_channels.
diff --git a/libav.h b/libav.h
index b69752c..aed9d18 100644
--- a/libav.h
+++ b/libav.h
@@ -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