mirror of
https://github.com/moonlight-stream/moonlight-embedded.git
synced 2026-02-16 10:30:47 +00:00
Add a hack to work around dependency issues with Java's native library loader
This commit is contained in:
@@ -37,6 +37,14 @@ public class SwingCpuDecoderRenderer implements VideoDecoderRenderer {
|
||||
int avcFlags = AvcDecoder.LOW_LATENCY_DECODE;
|
||||
int threadCount = 1;
|
||||
|
||||
// Hack to work around the bad Java native library loader
|
||||
// which can't resolve native library dependencies
|
||||
if (System.getProperty("os.name").contains("Windows")) {
|
||||
System.loadLibrary("avutil-52");
|
||||
System.loadLibrary("postproc-52");
|
||||
System.loadLibrary("pthreadVC2");
|
||||
}
|
||||
|
||||
int err = AvcDecoder.init(width, height, avcFlags, threadCount);
|
||||
if (err != 0) {
|
||||
throw new IllegalStateException("AVC decoder initialization failure: "+err);
|
||||
|
||||
Reference in New Issue
Block a user