From f2ed50e6b07f315f8fe2cfa6da0dcd50b90ea844 Mon Sep 17 00:00:00 2001 From: Jan Beich Date: Fri, 21 Jan 2022 17:12:13 +0000 Subject: [PATCH] cellVdec: constify AVInputFormat for ffmpeg >= 5.0 rpcs3/Emu/Cell/Modules/cellAdec.cpp:326:19: error: assigning to 'AVInputFormat *' from 'const AVInputFormat *' discards qualifiers input_format = av_find_input_format("oma"); ^~~~~~~~~~~~~~~~~~~~~~~~~~~ rpcs3/Emu/Cell/Modules/cellAdec.cpp:332:19: error: assigning to 'AVInputFormat *' from 'const AVInputFormat *' discards qualifiers input_format = av_find_input_format("mp3"); ^~~~~~~~~~~~~~~~~~~~~~~~~~~ --- rpcs3/Emu/Cell/Modules/cellAdec.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rpcs3/Emu/Cell/Modules/cellAdec.cpp b/rpcs3/Emu/Cell/Modules/cellAdec.cpp index 83ef53666d..e98ce05fea 100644 --- a/rpcs3/Emu/Cell/Modules/cellAdec.cpp +++ b/rpcs3/Emu/Cell/Modules/cellAdec.cpp @@ -270,7 +270,11 @@ public: bool just_finished = false; const AVCodec* codec = nullptr; +#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(59, 0, 0) + const AVInputFormat* input_format = nullptr; +#else AVInputFormat* input_format = nullptr; +#endif AVCodecContext* ctx = nullptr; AVFormatContext* fmt = nullptr; u8* io_buf;