[FFmpeg-devel] ABI break between 3.0 and 3.3 without symvers/SONAME changes

wm4 nfxjfg at googlemail.com
Sat Jun 3 15:38:44 EEST 2017


On Sat, 3 Jun 2017 14:31:31 +0200 (CEST)
Jan Engelhardt <jengelh at inai.de> wrote:

> On Saturday 2017-06-03 14:27, Timo Rothenpieler wrote:
> >  
> >> could ffmpeg then ensure that the major is in fact bumped on major
> >> releases? In distro context, a bump is easier to swallow than a
> >> non-bump..  
> >
> > It is made sure that the public ABI does not break between major
> > releases, this the major version is not bumped. The problem in
> > practice is that _a lot_ of downstream library users misuse the API,
> > using non-public fields and what not, and still end up breaking, most
> > commonly at ffmpeg major releases.  

They run into problems even if they try to play by the rules. It
doesn't help that there is nothing preventing undefined behavior if a
user downgrades the ffmpeg libs either.

> 
> Would this be a feasible approach to inhibit users accessing private
> fields?
> 
> avcodec.h:
> struct AVcontext {
> 	/* only public fields */
> };
> avcodec_internal.h:
> struct AVcontext_full {
> 	struct AVcontext base;
> 	/* all the private fields */
> };
> void somefunc(AVcontext *a)
> {
> 	AVcontext_full *af = a;
> 	...
> }

That is done to some degree, but not everywhere. (We use completely
separate structs and an "internal" field though).

Patches would probably be welcomed, although especially for AVCodec
this could end up awkward.


More information about the ffmpeg-devel mailing list