Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] minidlna compile error
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
snIP3r
l33t
l33t


Joined: 21 May 2004
Posts: 859
Location: germany

PostPosted: Tue Apr 08, 2025 6:15 am    Post subject: [solved] minidlna compile error Reply with quote

hi all!

after the recent world update i get an compile error with minidlna 1.3.3:

Code:

x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I.    -Wall -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -march=haswell -O2 -pipe -c -o scanner.o scanner.c
x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I.    -Wall -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -march=haswell -O2 -pipe -c -o monitor.o monitor.c
In file included from metadata.c:34:
metadata.c: In function ‘GetVideoMetadata’:
libav.h:177:38: error: ‘AVCodecParameters’ has no member named ‘ch_layout’; did you mean ‘channel_layout’?
  177 | #define lav_channels(s) s->codecpar->ch_layout.nb_channels
      |                                      ^~~~~~~~~
metadata.c:781:53: note: in expansion of macro ‘lav_channels’
  781 |                                                 if( lav_channels(astream) <= 2 &&
      |                                                     ^~~~~~~~~~~~
libav.h:177:38: error: ‘AVCodecParameters’ has no member named ‘ch_layout’; did you mean ‘channel_lay


has somebody similar issues?
thx for help in advance
snIP3r
_________________
Intel i3-4130T on ASUS P9D-X
Kernel 6.6.52-gentoo SMP
-----------------------------------------------
if your problem is fixed please add something like [solved] to the topic!


Last edited by snIP3r on Tue Apr 08, 2025 7:03 am; edited 1 time in total
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 31649
Location: here

PostPosted: Tue Apr 08, 2025 6:36 am    Post subject: Reply with quote

What version of ffmpeg you installed?
Code:
  177 | #define lav_channels(s) s->codecpar->ch_layout.nb_channels
      |                                      ^~~~~~~~~

This error line seems related to patch added by portage for the compatibily with ffmpeg-7
net-misc/minidlna/files/minidlna-1.3.3-ffmpeg7.patch:
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

_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
snIP3r
l33t
l33t


Joined: 21 May 2004
Posts: 859
Location: germany

PostPosted: Tue Apr 08, 2025 6:47 am    Post subject: Reply with quote

oh, i think its very old:

Code:

media-video/ffmpeg
      Latest version available: 4.4.5-r2
      Latest version installed: 4.4.5-r2

i will check any masked entries in my local config files... dont know why such an old version is installed...
_________________
Intel i3-4130T on ASUS P9D-X
Kernel 6.6.52-gentoo SMP
-----------------------------------------------
if your problem is fixed please add something like [solved] to the topic!
Back to top
View user's profile Send private message
snIP3r
l33t
l33t


Joined: 21 May 2004
Posts: 859
Location: germany

PostPosted: Tue Apr 08, 2025 7:02 am    Post subject: Reply with quote

after updating ffmpeg to 6.1.2-r1 minidlna compiles as it should...
thx for help!!!
_________________
Intel i3-4130T on ASUS P9D-X
Kernel 6.6.52-gentoo SMP
-----------------------------------------------
if your problem is fixed please add something like [solved] to the topic!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum