File Fix-build-with-FFmpeg-5.patch of Package ffmpegthumbs4
From d27049f9a62c63dd3898d8f7c5fff2244c13af86 Mon Sep 17 00:00:00 2001
From: Antonio Rojas <arojas@archlinux.org>
Date: Tue, 15 Mar 2022 23:58:34 +0100
Subject: [PATCH] Fix build with FFmpeg 5
AVCodec is const in FFmpeg 5
BUG: 448776
---
ffmpegthumbnailer/moviedecoder.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/ffmpegthumbnailer/moviedecoder.h b/ffmpegthumbnailer/moviedecoder.h
index 502abe9..03eb6dd 100644
--- a/ffmpegthumbnailer/moviedecoder.h
+++ b/ffmpegthumbnailer/moviedecoder.h
@@ -57,7 +57,11 @@ private:
int m_VideoStream;
AVFormatContext* m_pFormatContext;
AVCodecContext* m_pVideoCodecContext;
+#if LIBAVCODEC_VERSION_MAJOR < 59
AVCodec* m_pVideoCodec;
+#else
+ const AVCodec* m_pVideoCodec;
+#endif
AVStream* m_pVideoStream;
AVFrame* m_pFrame;
quint8* m_pFrameBuffer;
--
GitLab