Bug 1356 - "Future proof" ffmpeg libraries loading prevents using legit libraries
Summary: "Future proof" ffmpeg libraries loading prevents using legit libraries
Status: UNCONFIRMED
Alias: None
Product: Jogl
Classification: JogAmp
Component: opengl (show other bugs)
Version: 2.4.0
Hardware: All all
: P4 normal
Assignee: Sven Gothel
URL:
Depends on:
Blocks:
 
Reported: 2017-08-17 14:24 CEST by Maxime Caignart
Modified: 2017-08-18 09:06 CEST (History)
0 users

See Also:
Type: DEFECT
SCM Refs:
Workaround: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Maxime Caignart 2017-08-17 14:24:18 CEST
Hello dear jogamp maintainers.

This case happens on a linux desktop where ffmpeg libraries too recent for jogamp are installed.

To ensure that decoding is possible, I provide *working* ffmpeg libraries with my program. There are embedded and loaded using LD_LIBRARY_PATH.
It works perfectly fine on computers not having such libs installed and computer having older libs installed.

However, when the system has more recent libs, some "future proof" code loads thoses too recent libs. Those libs are not compatible with the current jogamp code.

The issue is located in FFMPEGDynamicLibraryBundleInfo::getToolLibNames().
For each libs you'll notice a "dummy future proof" lib version. 

In a perfect world, the best solution would be to have an updated jogamp that manages the latest ffmpeg versions.
But even in this case, adding unsupported versions to the list of the accepted library names is not so future proof.

Any idea on a workaround while waiting for a fix ?

Thanks in advance.
Maxime
Comment 1 Maxime Caignart 2017-08-18 09:06:29 CEST
A little try and fail later, I found an easy workaround for this issue.

The workaround consists in :
- providing the latest working ffmpeg libs for jogamp in a directory
- create symbolic linksfor every .so and name them with the latest version
- use LD_LIBRARY_PATH to specify this directory at program launch

As an example, here are the commands I executed inside the directory :
ln -s libavcodec.so.56 libavcodec.so.57
ln -s libavdevice.so.56 libavdevice.so.57
ln -s libavfilter.so.5 libavfilter.so.6
ln -s libavformat.so.56 libavformat.so.57
ln -s libavresample.so.2 libavresample.so.3
ln -s libavutil.so.54 libavutil.so.55
ln -s libswresample.so.1 libswresample.so.2
ln -s libswscale.so.3 libswscale.so.4
ln -s libvpx.so.2 libvpx.so.3
ln -s libvpx.so.2 libvpx.so.4