From 1dc2eb1cc84773c96137a8894a55de9be7ce39f1 Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Sun, 23 Feb 2020 20:45:16 +0300 Subject: [PATCH] Avoid deprecated av_register_all with version check. --- rpcs3/Emu/Cell/Modules/cellAdec.cpp | 4 ++-- rpcs3/Emu/Cell/Modules/cellVdec.cpp | 11 +++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/rpcs3/Emu/Cell/Modules/cellAdec.cpp b/rpcs3/Emu/Cell/Modules/cellAdec.cpp index ba2d80c974..8497d6bef2 100644 --- a/rpcs3/Emu/Cell/Modules/cellAdec.cpp +++ b/rpcs3/Emu/Cell/Modules/cellAdec.cpp @@ -315,8 +315,8 @@ public: , cbFunc(func) , cbArg(arg) { - av_register_all(); - avcodec_register_all(); + //av_register_all(); + //avcodec_register_all(); switch (type) { diff --git a/rpcs3/Emu/Cell/Modules/cellVdec.cpp b/rpcs3/Emu/Cell/Modules/cellVdec.cpp index fd164a9992..c25b4ce3f6 100644 --- a/rpcs3/Emu/Cell/Modules/cellVdec.cpp +++ b/rpcs3/Emu/Cell/Modules/cellVdec.cpp @@ -132,7 +132,18 @@ struct vdec_context final , cb_func(func) , cb_arg(arg) { +#ifdef _MSC_VER +#pragma warning(push, 0) +#else +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif avcodec_register_all(); +#ifdef _MSC_VER +#pragma warning(pop) +#else +#pragma GCC diagnostic pop +#endif switch (type) {