From 852faf012d8c6a93f65e0ebce87b3f70d8e2b6bf Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Thu, 17 Sep 2015 02:25:57 +0200 Subject: FFMPEGDynamicLibraryBundleInfo.initSymbols(): Just return null instead of throwing an exception, it is OK not to have ffmpeg/libav --- .../opengl/util/av/impl/FFMPEGDynamicLibraryBundleInfo.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGDynamicLibraryBundleInfo.java b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGDynamicLibraryBundleInfo.java index f294d5bc0..595fed77a 100644 --- a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGDynamicLibraryBundleInfo.java +++ b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGDynamicLibraryBundleInfo.java @@ -37,7 +37,7 @@ import java.util.List; import java.util.Set; import com.jogamp.opengl.GLProfile; - +import com.jogamp.common.ExceptionUtils; import com.jogamp.common.os.DynamicLibraryBundle; import com.jogamp.common.os.DynamicLibraryBundleInfo; import com.jogamp.common.util.RunnableExecutor; @@ -190,7 +190,8 @@ class FFMPEGDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo { libLoaded[i] = dl.isToolLibLoaded(i); } if( !libLoaded[LIB_IDX_UTI] || !libLoaded[LIB_IDX_FMT] || !libLoaded[LIB_IDX_COD] ) { - throw new RuntimeException("FFMPEG Tool library incomplete: [ avutil "+libLoaded[LIB_IDX_UTI]+", avformat "+libLoaded[LIB_IDX_FMT]+", avcodec "+libLoaded[LIB_IDX_COD]+"]"); + System.err.println("FFMPEG Tool library incomplete: [ avutil "+libLoaded[LIB_IDX_UTI]+", avformat "+libLoaded[LIB_IDX_FMT]+", avcodec "+libLoaded[LIB_IDX_COD]+"]"); + return null; } dl.claimAllLinkPermission(); try { @@ -216,7 +217,10 @@ class FFMPEGDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo { throw new InternalError("XXX0 "+symbolNames.length+" != "+symbolCount); } - AccessController.doPrivileged(privInitSymbolsAction); + final DynamicLibraryBundle dl = AccessController.doPrivileged(privInitSymbolsAction); + if( null == dl ) { + return false; + } // optional symbol name set final Set optionalSymbolNameSet = new HashSet(); @@ -254,7 +258,7 @@ class FFMPEGDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo { try { _ready = initSymbols(_versions); } catch (final Throwable t) { - t.printStackTrace(); + ExceptionUtils.dumpThrowable("", t); } libsUFCLoaded = libLoaded[LIB_IDX_UTI] && libLoaded[LIB_IDX_FMT] && libLoaded[LIB_IDX_COD]; avUtilVersion = _versions[0]; -- cgit v1.2.3