]> git.ipfire.org Git - people/mfischer/ipfire-2.x.git/commitdiff
minidlna: Add patch to add compatibility with ffmpeg-7.0
authorAdolf Belka <adolf.belka@ipfire.org>
Wed, 21 Aug 2024 18:46:09 +0000 (20:46 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 23 Aug 2024 10:01:06 +0000 (10:01 +0000)
- 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>
lfs/minidlna
src/patches/minidlna-1.3.3_add_compatibility_with_ffmpeg_7.0.patch [new file with mode: 0644]

index eb989567c1b02a34923cc82cd93221cb8196e8f0..6415bb0fd83f4ec28a40677430e0bd34fedd0957 100644 (file)
@@ -34,7 +34,7 @@ DL_FROM    = $(URL_IPFIRE)
 DIR_APP    = $(DIR_SRC)/$(THISAPP)
 TARGET     = $(DIR_INFO)/$(THISAPP)
 PROG       = minidlna
-PAK_VER    = 15
+PAK_VER    = 16
 
 DEPS       = ffmpeg flac libexif libid3tag libogg
 
@@ -84,7 +84,9 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        @$(PREBUILD)
        @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
        $(UPDATE_AUTOMAKE)
-       cd $(DIR_APP) && ./configure --prefix=/usr
+       cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/minidlna-1.3.3_add_compatibility_with_ffmpeg_7.0.patch
+       cd $(DIR_APP) && ./configure \
+                               --prefix=/usr
        cd $(DIR_APP) && make $(MAKETUNING) $(EXTRA_MAKE)
        cd $(DIR_APP) && make install
 
diff --git a/src/patches/minidlna-1.3.3_add_compatibility_with_ffmpeg_7.0.patch b/src/patches/minidlna-1.3.3_add_compatibility_with_ffmpeg_7.0.patch
new file mode 100644 (file)
index 0000000..86c9fa0
--- /dev/null
@@ -0,0 +1,23 @@
+--- 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