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

Stephen Hutchinson qyot27 at gmail.com
Sun Jan 18 20:56:59 CET 2015

On Fri, Jan 16, 2015 at 8:40 AM, Derek Buitenhuis
<derek.buitenhuis at gmail.com> wrote:
> On 1/16/2015 12:47 AM, Stephen Hutchinson wrote:
>> There have been times I've run into issues
>> because a shared library FFmpeg was linked against somehow
>> got removed or was updated and broke compatibility.
> [...]

Usually, that was on older versions of OSX, before Homebrew
and the straightening out of what Xcode provided.

>> Dynamic loading allows the main binary to still function
>> correctly if this occurs, with the issue only arising if the user
>> attempts to use the missing library, in which case the
>> methodology of doing dynamic loading allows for a graceful
>> exit rather than the program crashing.
> This is definitely wrong. An ABI break would still have
> the *exact* same issues as before, when the wrong library
> is loaded. In fact, it's worse, since it potentially ignores
> the soname.

Yeah in the case of a breakage (it used to happen
with AviSynth 2.5 because the row functions silently changed
between 2.5 and 2.6).  I was mainly referring to the case of a
lib simply missing, or where version detection is in place
so older, unsupported versions get rejected.  But the difference
is that in the case of a dlopen-ed lib being incompatible
without a guard to shunt it, the crash would happen when
you try to use the particular library, not when using the
program generally.

More information about the ffmpeg-devel mailing list