From patchwork Wed Aug 21 18:46:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adolf Belka X-Patchwork-Id: 8044 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature RSA-PSS (4096 bits)) (Client CN "mail01.haj.ipfire.org", Issuer "R11" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4WpwK7636Rz3xGD for ; Wed, 21 Aug 2024 18:46:19 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) client-signature ECDSA (secp384r1)) (Client CN "mail02.haj.ipfire.org", Issuer "E5" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4WpwK71YZSz2sx; Wed, 21 Aug 2024 18:46:19 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4WpwK66tffz345S; Wed, 21 Aug 2024 18:46:18 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature RSA-PSS (4096 bits)) (Client CN "mail01.haj.ipfire.org", Issuer "R11" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4WpwK46vY8z2ybk for ; Wed, 21 Aug 2024 18:46:16 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4WpwK45Ns7z1Hm; Wed, 21 Aug 2024 18:46:16 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1724265976; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xDGd2E5bLghcOt6pAvSDl3A+qJDoxKr1ZIINJOaSYUU=; b=D3VUKa+Dnn7eRsdpOFNHukp72fjKDsuIYNetRfps7E6t13icQa9IoZNPz78m42Wdz/jINK 8HUdxMw49I49owAg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1724265976; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xDGd2E5bLghcOt6pAvSDl3A+qJDoxKr1ZIINJOaSYUU=; b=Yfs4BbQlZJHzlDYGQupa9rgysMp94qEngkOkrQWO5r8qloJS5IGNaU5XVE9dRH3HbzMF38 1ZMUz1nWjQAJloXpiW3ahtNDlEJMZZCmFY4K3p5EbexcjHcdZNKno4awMf0uYPTfer8wRZ 6n4AjiEA0gu/6hB4tjUWqlfJTmLr/ZwE6XVVWg1nHH8RlyjTGi/SEIdyxc0ODj/MDGICGw Jj4qXvJfFUA2zbwrcSstQHHOzv390YNGz4xw8p39uUvQtjztY1gjuyfXPv7zNo+iBTRbYB pyGBFQFg+6CG2vORawwn26tizwSr9bALouQLaDXMvNmgEf6dAt5X2NPY8kNQ0Q== From: Adolf Belka To: development@lists.ipfire.org Subject: [PATCH 2/4] minidlna: Add patch to add compatibility with ffmpeg-7.0 Date: Wed, 21 Aug 2024 20:46:09 +0200 Message-ID: <20240821184611.1906582-2-adolf.belka@ipfire.org> In-Reply-To: <20240821184611.1906582-1-adolf.belka@ipfire.org> References: <20240821184611.1906582-1-adolf.belka@ipfire.org> MIME-Version: 1.0 Message-ID-Hash: KVICS5YCS3YXGKBD2YUXB5TASXOAOCW7 X-Message-ID-Hash: KVICS5YCS3YXGKBD2YUXB5TASXOAOCW7 X-MailFrom: adolf.belka@ipfire.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: IPFire development talk Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: - 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 --- lfs/minidlna | 6 +++-- ....3_add_compatibility_with_ffmpeg_7.0.patch | 23 +++++++++++++++++++ 2 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 src/patches/minidlna-1.3.3_add_compatibility_with_ffmpeg_7.0.patch diff --git a/lfs/minidlna b/lfs/minidlna index eb989567c..6415bb0fd 100644 --- a/lfs/minidlna +++ b/lfs/minidlna @@ -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 index 000000000..86c9fa019 --- /dev/null +++ b/src/patches/minidlna-1.3.3_add_compatibility_with_ffmpeg_7.0.patch @@ -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