*** If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports *** SUMMARY src/musicbrainz/MusicDNSAudioDecoder.cpp fails to compile with Ubuntu Jammy's version of FFMPEG (4.4.2) STEPS TO REPRODUCE 1. Compile Amarok on Ubuntu Jammy from git after 42d249b659253b8970bd870d77a56c869e79bcef and f6143b2df0b251f3e5e5665ea7121e49b0f45d7e. OBSERVED RESULT /<<PKGBUILDDIR>>/src/musicbrainz/MusicDNSAudioDecoder.cpp: In member function ‘int MusicDNSAudioDecoder::decode(const QString&, DecodedAudioData*, int)’: /<<PKGBUILDDIR>>/src/musicbrainz/MusicDNSAudioDecoder.cpp:327:63: error: invalid user-defined conversion from ‘QByteArray’ to ‘const char*’ [-fpermissive] 327 | if( avformat_open_input( &pFormatCtx, fileName.toLocal8Bit(), nullptr, nullptr ) < 0 ) | ~~~~~~~~~~~~~~~~~~~~^~ See: https://launchpadlibrarian.net/740431669/buildlog_ubuntu-jammy-amd64.amarok_2%3A3.0.1+git202407210215-0+yasi1~22~ubuntu22.04.1_BUILDING.txt.gz EXPECTED RESULT Compilation succeeds. SOFTWARE/OS VERSIONS Linux/KDE Plasma: Kubuntu 22.04 (available in About System) KDE Plasma Version: 5.24.7 KDE Frameworks Version: 5.92 Qt Version: 5.15.3 ADDITIONAL INFORMATION fileName.toLocal8Bit().constData() looks like it was made in one of the FFMPEG version branches, but not in the #elif LIBAVCODEC_VERSION_MAJOR >= 54 branch.
Thank you again for noticing! That's a sneaky place in code. Maybe I'll clean up some bits too while I'm at it, as the older codepaths have been bypassed by various modernization efforts, and still to use NULL etc.
Git commit 622440b76f3c174b41072fd358bd5f7ffdf6aca5 by Tuomas Nurmi. Committed on 22/07/2024 at 23:13. Pushed by nurmi into branch 'master'. Fix compilation with ffmpeg < 5 Also drop some code for ffmpeg 0.10 and older, which were released 10+ years ago. M +1 -463 src/musicbrainz/MusicDNSAudioDecoder.cpp https://invent.kde.org/multimedia/amarok/-/commit/622440b76f3c174b41072fd358bd5f7ffdf6aca5