From e9a4b82267e6e78a7378bd428c9e8d4807e7358b Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Thu, 12 Dec 2013 17:06:09 -0500 Subject: [PATCH] Add a hack to work around dependency issues with Java's native library loader --- .../limelight/binding/video/SwingCpuDecoderRenderer.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/limelight-pc/src/com/limelight/binding/video/SwingCpuDecoderRenderer.java b/limelight-pc/src/com/limelight/binding/video/SwingCpuDecoderRenderer.java index 40d59ef..c8a8423 100644 --- a/limelight-pc/src/com/limelight/binding/video/SwingCpuDecoderRenderer.java +++ b/limelight-pc/src/com/limelight/binding/video/SwingCpuDecoderRenderer.java @@ -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);