1
0
Fork 0
mirror of https://github.com/Ryujinx/Ryujinx.git synced 2024-12-05 01:32:00 +00:00

fix ffmpeg lib path

This commit is contained in:
Ac_K 2021-05-19 23:34:42 +02:00
parent 49745cfa37
commit 41e2ead0f0

View file

@ -12,6 +12,7 @@ using Ryujinx.Ui;
using Ryujinx.Ui.Widgets; using Ryujinx.Ui.Widgets;
using SixLabors.ImageSharp.Formats.Jpeg; using SixLabors.ImageSharp.Formats.Jpeg;
using System; using System;
using System.Diagnostics;
using System.IO; using System.IO;
using System.Reflection; using System.Reflection;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
@ -80,7 +81,18 @@ namespace Ryujinx
XInitThreads(); XInitThreads();
// Configure FFmpeg search path // 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); string systemPath = Environment.GetEnvironmentVariable("Path", EnvironmentVariableTarget.Machine);