From 8c9491775a5af072bfbcf1a2fdfc1f016d1333cf Mon Sep 17 00:00:00 2001
From: Antonio Rojas <arojas@archlinux.org>
Date: Tue, 25 Jan 2022 12:53:45 +0100
Subject: [PATCH] Fix build with FFmpeg 5

---
 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
