From 41e2ead0f021597eb7f89856b4c11ef17afbdad4 Mon Sep 17 00:00:00 2001 From: Ac_K Date: Wed, 19 May 2021 23:34:42 +0200 Subject: [PATCH] fix ffmpeg lib path --- Ryujinx/Program.cs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Ryujinx/Program.cs b/Ryujinx/Program.cs index 9600f9dce..2e160d798 100644 --- a/Ryujinx/Program.cs +++ b/Ryujinx/Program.cs @@ -12,6 +12,7 @@ using Ryujinx.Ui; using Ryujinx.Ui.Widgets; using SixLabors.ImageSharp.Formats.Jpeg; using System; +using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.InteropServices; @@ -80,7 +81,18 @@ namespace Ryujinx XInitThreads(); // Configure FFmpeg search path - ffmpeg.RootPath = "/lib"; + Process lddProcess = Process.Start(new ProcessStartInfo + { + FileName = "/bin/sh", + Arguments = "-c \"ldd $(which ffmpeg) | grep libavfilter\"", + UseShellExecute = false, + RedirectStandardOutput = true + }); + + ffmpeg.RootPath = Path.GetDirectoryName(lddProcess.StandardOutput.ReadToEnd().Split(" => ")[1]); + + lddProcess.WaitForExit(); + lddProcess.Close(); } string systemPath = Environment.GetEnvironmentVariable("Path", EnvironmentVariableTarget.Machine);