media-tv/kodi crashes when playing a video file with aac audio. This happens when it is built with media-video/ffmpeg-6.1.2. Reverting to media-video/ffmpeg-6.1.1-r8 fixed the problem. Reproducible: Always Steps to Reproduce: 1. Play a video with AAC audio 2. Crash Actual Results: kodi crashes Expected Results: Play the video without a crash emerge --info output: Portage 3.0.66.1 (python 3.12.8-final-0, default/linux/amd64/23.0/split-usr/desktop, gcc-13, glibc-2.40-r5, 6.6.67-gentoo x86_64) ================================================================= System uname: Linux-6.6.67-gentoo-x86_64-Intel-R-_Core-TM-_i3_CPU_550_@_3.20GHz-with-glibc2.40 KiB Mem: 8137736 total, 3091716 free KiB Swap: 4095996 total, 3523424 free Timestamp of repository gentoo: Mon, 06 Jan 2025 08:03:42 +0000 Head commit of repository gentoo: 2969027440adbf1ef4dde2b37090b369567ce8b9 sh bash 5.2_p37 ld GNU ld (Gentoo 2.43 p3) 2.43.1 app-misc/pax-utils: 1.3.8::gentoo app-shells/bash: 5.2_p37::gentoo dev-build/autoconf: 2.13-r8::gentoo, 2.72-r1::gentoo dev-build/automake: 1.16.5-r2::gentoo dev-build/cmake: 3.30.6::gentoo dev-build/libtool: 2.4.7-r4::gentoo dev-build/make: 4.4.1-r100::gentoo dev-build/meson: 1.5.2::gentoo dev-java/java-config: 2.3.4::gentoo dev-lang/perl: 5.40.0::gentoo dev-lang/python: 3.12.8::gentoo, 3.13.1::gentoo dev-lang/rust-bin: 1.81.0-r101::gentoo, 1.82.0-r101::gentoo llvm-core/clang: 18.1.8-r6::gentoo, 19.1.4::gentoo llvm-core/lld: 18.1.8::gentoo, 19.1.4::gentoo llvm-core/llvm: 18.1.8-r6::gentoo, 19.1.4::gentoo sys-apps/baselayout: 2.17::gentoo sys-apps/openrc: 0.55.1::gentoo sys-apps/sandbox: 2.39::gentoo sys-devel/binutils: 2.43-r2::gentoo sys-devel/binutils-config: 5.5.2::gentoo sys-devel/gcc: 11.3.1_p20221209::gentoo, 12.3.1_p20230526::gentoo, 13.3.1_p20241025::gentoo, 14.2.1_p20241221::gentoo sys-devel/gcc-config: 2.11::gentoo sys-kernel/linux-headers: 6.6-r1::gentoo (virtual/os-headers) sys-libs/glibc: 2.40-r5::gentoo Repositories: gentoo location: /var/db/repos/gentoo sync-type: git sync-uri: https://github.com/gentoo-mirror/gentoo priority: -1000 volatile: False sync-git-verify-commit-signature: yes local location: /var/db/repos/local masters: gentoo volatile: False ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="@FREE" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -march=native -fomit-frame-pointer -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /var/bind" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php8.2/ext-active/ /etc/php/cgi-php8.2/ext-active/ /etc/php/cli-php8.2/ext-active/ /etc/php/fpm-php8.2/ext-active/ /etc/php/phpdbg-php8.2/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-O2 -march=native -fomit-frame-pointer -pipe" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="--with-bdeps y --quiet-build" ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg-live buildsyspkg config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync merge-wait multilib-strict network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="en_GB.utf-8" LC_ALL="en_GB.utf-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs" LEX="flex" LINGUAS="en_GB" MAKEOPTS="-j4 --load-average=3.6" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git" PORTAGE_TMPDIR="/var/tmp" SHELL="/bin/bash" USE="X a52 aac acl acpi alsa amd64 bash-completion bluray branding bzip2 cairo cdda cdr cet crypt dbus dri dts dvb dvd dvdr elogind encode exif ffmpeg fftw flac gdbm gif gpm gtk gui iconv icu ipv6 jpeg json kf6compat latin1 lcms libnotify libtirpc lirc mad mng mp3 mp4 mpeg multilib mysql mytharchive mythbrowser mythgallery mythmusic mythnetvision ncurses nfsv41 nls ogg opengl openmp opus pam pango pcre pdf png policykit ppds qml qt5 qt6 readline sdl seccomp sound spell split-usr ssl startup-notification svg test-rust tiff truetype udev udisks uk_atlas unicode upower usb v4l2 vdpau vorbis vulkan wayland wxwidgets x264 x265 xattr xcb xft xml xv xvid xvmc zlib" ABI_X86="64" ADA_TARGET="gcc_13" ALSA_CARDS="hda-intel" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias access auth auth_basic auth_dbm auth_anon auth_digest authn_file authz_core authz_host authz_owner authz_user alias file-cache echo charset-lite cache disk-cache mem-cache ext-filter case_filter case-filter-in deflate mime-magic cern-meta expires headers usertrack unique-id proxy proxy-connect proxy-ftp proxy-http info include cgi cgid dav dav-fs vhost-alias speling rewrite log_config logio env setenvif mime status autoindex asis negotiation dir imap actions userdir so filter unique_id qt3support" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" GUILE_SINGLE_TARGET="3-0" GUILE_TARGETS="3-0" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en-GB" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-2" POSTGRES_TARGETS="postgres16" PYTHON_SINGLE_TARGET="python3_12" PYTHON_TARGETS="python3_12" RUBY_TARGETS="ruby32" VIDEO_CARDS="nvidia vesa fbdev" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account" Unset: ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LD, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Could you try to get a backtrace from Kodi? Either via a coredump or by running Kodi under gdb (which will be quite slow)?
Created attachment 916004 [details] kodi crash log containing a gdb stack trace
So ffmpeg-6.1.2 backported https://github.com/FFmpeg/FFmpeg/commit/b586ff27683af11315f3e637c08e0ec0a07d9f35 which assumes avctx cannot be NULL. The assumption is right in the 7 branch as the following change is applied there https://github.com/FFmpeg/FFmpeg/commit/d9f1b321cf58a85518d29c5a3d220d67b1a68b92. This change does not exist on 6.1.2 meaning it segfaults.
Missing commit backported to 6.1 branch https://github.com/FFmpeg/FFmpeg/commit/b1baad4a5ffcbc932f242f27165bb329782b4375