Skip to content

Commit 93bce50

Browse files
committed
minidlna: fix build with FFmpeg 7 and later
FFmpeg 7 removed AVCodecParameters.channels, causing MiniDLNA 1.3.3 to fail to compile when reading audio channel counts. Add an OpenWrt package patch to use ch_layout.nb_channels with libavcodec 61 and later. Retain the existing channels field access for older versions. Signed-off-by: Marcin Maj <marcinmajsc@gmail.com>
1 parent 72e4f90 commit 93bce50

2 files changed

Lines changed: 18 additions & 1 deletion

File tree

multimedia/minidlna/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
99

1010
PKG_NAME:=minidlna
1111
PKG_VERSION:=1.3.3
12-
PKG_RELEASE:=2
12+
PKG_RELEASE:=3
1313

1414
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
1515
PKG_SOURCE_URL:=@SF/minidlna
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2+
From: Marcin Maj <marcinmajsc@gmail.com>
3+
Date: Sat, 19 Sep 2026 12:00:00 +0000
4+
Subject: [PATCH] Fix audio channel count access with FFmpeg 7
5+
---
6+
libav.h | 4 ++++
7+
1 file changed, 4 insertions(+)
8+
9+
diff --git a/libav.h b/libav.h
10+
--- a/libav.h
11+
+++ b/libav.h
12+
@@ -177 +177,5 @@
13+
+#if LIBAVCODEC_VERSION_MAJOR >= 61
14+
+#define lav_channels(s) s->codecpar->ch_layout.nb_channels
15+
+#else
16+
#define lav_channels(s) s->codecpar->channels
17+
+#endif

0 commit comments

Comments
 (0)