From 3a3380fa2578bf1731c6cd7cebdca7b7cc5681b0 Mon Sep 17 00:00:00 2001 From: Mary-nyan Date: Sun, 24 Jul 2022 11:39:56 +0200 Subject: [PATCH] fix: Ensure to load latest version of ffmpeg libraries first (#3473) Fix a possible crash related to older version of ffmpeg being loaded instewad of the one shipped with the emulator. --- Ryujinx.Graphics.Nvdec.FFmpeg/Native/FFmpegApi.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Ryujinx.Graphics.Nvdec.FFmpeg/Native/FFmpegApi.cs b/Ryujinx.Graphics.Nvdec.FFmpeg/Native/FFmpegApi.cs index 4c010783..9bf71778 100644 --- a/Ryujinx.Graphics.Nvdec.FFmpeg/Native/FFmpegApi.cs +++ b/Ryujinx.Graphics.Nvdec.FFmpeg/Native/FFmpegApi.cs @@ -45,7 +45,7 @@ namespace Ryujinx.Graphics.Nvdec.FFmpeg.Native { (int minVersion, int maxVersion) = value; - for (int version = minVersion; version <= maxVersion; version++) + for (int version = maxVersion; version >= minVersion; version--) { if (NativeLibrary.TryLoad(FormatLibraryNameForCurrentOs(libraryName, version), assembly, searchPath, out handle)) {