silan
silan copied to clipboard
Compilation error: ad_ffmpeg.c:117:40: error: ‘AVStream’ has no member named ‘codec’
I am on Arch Linux and try to build the package from AUR: https://aur.archlinux.org/packages/silan-git
quite early in the building process, I get errors in ad_ffmpeg.c: In function ‘ad_open_ffmpeg’ as shown below:
-----8<----- make all-recursive make[1]: Entering directory '/data/share/aur/silan-git/src/silan' Making all in audio_decoder make[2]: Entering directory '/data/share/aur/silan-git/src/silan/audio_decoder' gcc -DHAVE_CONFIG_H -I. -I.. -g -Wall -O2 -I.. -I/usr/include/opus -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -DNDEBUG -pipe -fmessage-length=139 -fdiagnostics-show-location=every-line -MT ad_ffmpeg.o -MD -MP -MF .deps/ad_ffmpeg.Tpo -c -o ad_ffmpeg.o ad_ffmpeg.c gcc -DHAVE_CONFIG_H -I. -I.. -g -Wall -O2 -I.. -I/usr/include/opus -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -DNDEBUG -pipe -fmessage-length=139 -fdiagnostics-show-location=every-line -MT ad_plugin.o -MD -MP -MF .deps/ad_plugin.Tpo -c -o ad_plugin.o ad_plugin.c gcc -DHAVE_CONFIG_H -I. -I.. -g -Wall -O2 -I.. -I/usr/include/opus -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -DNDEBUG -pipe -fmessage-length=139 -fdiagnostics-show-location=every-line -MT ad_soundfile.o -MD -MP -MF .deps/ad_soundfile.Tpo -c -o ad_soundfile.o ad_soundfile.c ad_ffmpeg.c: In function ‘ad_open_ffmpeg’: ad_ffmpeg.c:117:40: error: ‘AVStream’ has no member named ‘codec’ 117 | if (priv->formatContext->streams[i]->codec->codec_type == AVMEDIA_TYPE_AUDIO) { | ^~ ad_ffmpeg.c:128:71: error: ‘AVStream’ has no member named ‘codec’ 128 | priv->codecContext = priv->formatContext->streams[priv->audioStream]->codec; | ^~ -----8<----- Any way to fix this? Regards, Clemens