[FFmpeg-devel] [RFC] Support dynamic loading of third-party libs

wm4 nfxjfg at googlemail.com
Tue Jan 13 14:54:33 CET 2015

On Mon, 12 Jan 2015 18:59:33 +0100
Marc Giger <gigerstyle at gmx.ch> wrote:

> Hi,
> Attached is a preliminary patch that enables runtime loading of external
> libraries via dlopen and friends. Dynamic loading is a build time option
> (--enable-dynamic-loading) and if it is not activated the libs are
> linked as usual (still no dependency to dlopen required).
> The patch is intended as a basis for a discussion and therefore the
> following applies:
> - only libmp3lame and libva will by dynamically loaded atm
> - only tested on linux atm
> - deregistering not implemented (dlclose)
> - versioning (which version of a lib should be loaded?)
> - library usage counter missing
> - ...?
> What do you think?

What's the point?

Linux distros link everything anyway, they don't need to care.

Other projects (distributing executables on windows etc.) restrict
themselves to what they need anyway.

It also adds more global mutable state, which is not nice IMHO,
although that's an implementation detail as used in your patch. A
library usage counter is maintained by dlopen/dlclose already, by the

More information about the ffmpeg-devel mailing list