Add a hack to work around dependency issues with Java's native library loader

This commit is contained in:
Cameron Gutman
2013-12-12 17:06:09 -05:00
parent 8b45d95d60
commit e9a4b82267

View File

@@ -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);