Bug 509501 - k3b-25.08.1 fails to build with ffmpeg-8.0
Summary: k3b-25.08.1 fails to build with ffmpeg-8.0
Status: RESOLVED FIXED
Alias: None
Product: k3b
Classification: Applications
Component: Plugins (other bugs)
Version First Reported In: 25.08.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: K3b Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-09-14 22:30 UTC by David Korth
Modified: 2025-09-16 20:52 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Korth 2025-09-14 22:30:14 UTC
SUMMARY
K3b 25.08.1 fails to build with ffmpeg-8.0 due to its use of avcodec_close() in k3bffmpegwrapper.cpp. This function was deprecated in a previous version, and completely removed in ffmpeg-8.0. The recommended fix is to simply remove it; avcodec_free_context(), which is used right after avcodec_close() in k3bffmpegwrapper.cpp, automatically handles closing the codec.

STEPS TO REPRODUCE
1. Install ffmpeg-8.0.
2. Attempt to build k3b-25.08.1.

OBSERVED RESULT
k3b-25.08.1 fails to build due to avcodec_close() not being declared in the ffmpeg headers.

EXPECTED RESULT
k3b-25.08.1 builds.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Linux 6.16.7
KDE Plasma Version: 6.4.5
KDE Frameworks Version: 6.18.0
Qt Version: 6.9.2

ADDITIONAL INFORMATION
I'm not sure which version of ffmpeg avcodec_close() was deprecated in, but presumably it was actually needed before, so a preprocessor macro should be used to check for ffmpeg-8.0 and only use avcodec_close() if it's an older version.
Comment 1 Heiko Becker 2025-09-16 05:44:45 UTC
Git commit c10b680b224c0fb7ee77301b1532b0c5682004cc by Heiko Becker.
Committed on 15/09/2025 at 22:27.
Pushed by aacid into branch 'master'.

Fix build with ffmpeg >= 8

M  +4    -0    plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp

https://invent.kde.org/multimedia/k3b/-/commit/c10b680b224c0fb7ee77301b1532b0c5682004cc
Comment 2 Albert Astals Cid 2025-09-16 20:52:56 UTC
Git commit a76371f71ce29110afd3dcbe2d2b3375b65cf03c by Albert Astals Cid, on behalf of Heiko Becker.
Committed on 16/09/2025 at 20:52.
Pushed by aacid into branch 'release/25.08'.

Fix build with ffmpeg >= 8
(cherry picked from commit c10b680b224c0fb7ee77301b1532b0c5682004cc)

M  +4    -0    plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp

https://invent.kde.org/multimedia/k3b/-/commit/a76371f71ce29110afd3dcbe2d2b3375b65cf03c