File 8acb288c9e9bdb3c6bf2e803954dd3b6ac273c05.patch of Package goldendict
From 8acb288c9e9bdb3c6bf2e803954dd3b6ac273c05 Mon Sep 17 00:00:00 2001
From: Liao Junxuan <mikeljx@126.com>
Date: Sun, 20 Feb 2022 12:28:05 +0800
Subject: [PATCH] add support for ffmpeg 5.0
---
ffmpegaudio.cc | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/ffmpegaudio.cc b/ffmpegaudio.cc
index d550f4a77..7948d2187 100644
--- a/ffmpegaudio.cc
+++ b/ffmpegaudio.cc
@@ -94,7 +94,11 @@ struct DecoderContext
QByteArray audioData_;
QDataStream audioDataStream_;
AVFormatContext * formatContext_;
+#if LIBAVCODEC_VERSION_MAJOR < 59
AVCodec * codec_;
+#else
+ const AVCodec * codec_;
+#endif
AVCodecContext * codecContext_;
AVIOContext * avioContext_;
AVStream * audioStream_;