[neon/maui/maui-clip/Neon/release] debian/patches: backport merge request ffmpeg8 support
Carlos De Maine
null at kde.org
Thu Jul 30 07:01:10 BST 2026
Git commit 96ecca79d5a4aa2257d671d9bd25b69545365bb6 by Carlos De Maine.
Committed on 30/07/2026 at 06:01.
Pushed by carlosdem into branch 'Neon/release'.
backport merge request ffmpeg8 support
A +48 -0 debian/patches/ffmpeg8.diff
A +1 -0 debian/patches/series
https://invent.kde.org/neon/maui/maui-clip/-/commit/96ecca79d5a4aa2257d671d9bd25b69545365bb6
diff --git a/debian/patches/ffmpeg8.diff b/debian/patches/ffmpeg8.diff
new file mode 100644
index 0000000..3688b62
--- /dev/null
+++ b/debian/patches/ffmpeg8.diff
@@ -0,0 +1,48 @@
+diff --git a/src/utils/ffmpegthumbs/moviedecoder.cpp b/src/utils/ffmpegthumbs/moviedecoder.cpp
+index 95779a9b87c4b548f1f4498e4585136e4238be5d..bfae4d61f7f5af73eeaac4adce13b902db3daf41 100644
+--- a/src/utils/ffmpegthumbs/moviedecoder.cpp
++++ b/src/utils/ffmpegthumbs/moviedecoder.cpp
+@@ -11,6 +11,7 @@
+
+ extern "C" {
+ #include <libswscale/swscale.h>
++#include <libavcodec/version.h>
+ #include <libavutil/imgutils.h>
+ }
+
+@@ -87,7 +88,11 @@ void MovieDecoder::destroy()
+ {
+ deleteFilterGraph();
+ if (m_pVideoCodecContext) {
++#if LIBAVCODEC_VERSION_MAJOR >= 60
++ avcodec_free_context(&m_pVideoCodecContext);
++#else
+ avcodec_close(m_pVideoCodecContext);
++#endif
+ m_pVideoCodecContext = nullptr;
+ }
+
+@@ -211,7 +216,11 @@ void MovieDecoder::seek(int timeInSeconds)
+ }
+
+ ++keyFrameAttempts;
++#if LIBAVCODEC_VERSION_MAJOR >= 60
++ } while ((!gotFrame || !(m_pFrame->flags & AV_FRAME_FLAG_KEY)) && keyFrameAttempts < 200);
++#else
+ } while ((!gotFrame || !m_pFrame->key_frame) && keyFrameAttempts < 200);
++#endif
+
+ if (gotFrame == 0) {
+ qDebug() << "Seeking in video failed";
+@@ -365,7 +374,11 @@ bool MovieDecoder::processFilterGraph(AVFrame *dst, const AVFrame *src,
+
+ void MovieDecoder::getScaledVideoFrame(int scaledSize, bool maintainAspectRatio, VideoFrame& videoFrame)
+ {
++#if LIBAVCODEC_VERSION_MAJOR >= 60
++ if (m_pFrame->flags & AV_FRAME_FLAG_INTERLACED) {
++#else
+ if (m_pFrame->interlaced_frame) {
++#endif
+ processFilterGraph((AVFrame*) m_pFrame, (AVFrame*) m_pFrame, m_pVideoCodecContext->pix_fmt,
+ m_pVideoCodecContext->width, m_pVideoCodecContext->height);
+ }
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..4a24e08
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+ffmpeg8.diff
More information about the Neon-commits
mailing list