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

Hendrik Leppkes h.leppkes at gmail.com
Sat Jun 3 15:14:07 EEST 2017

On Sat, Jun 3, 2017 at 2:07 PM, Jan Engelhardt <jengelh at inai.de> wrote:
> On Saturday 2017-06-03 13:34, Hendrik Leppkes wrote:
>>On Sat, Jun 3, 2017 at 1:18 PM, Jan Engelhardt <jengelh at inai.de> wrote:
>>>The layout of struct AVCodec changed. Four function pointers were
>>>inserted in the middle, shifting void (*flush) to a new address.
>>>The size of AVCodec also changed, which would have required a full
>>>MAJOR bump.
>>Our ABI is stable in one direction, not in both. [...]
>>The same applies to structs. The size of structs is not  part of the
>>ABI, and as such we are free to grow it to accomodate new fields
>>without breaking the ABI.
> Size changes are breakers in both directions.
> You claim your ABI is stable in one direction, which means that a
> program built with 3.0 headers should work with a 3.3 library on a
> separate system. However, a 3.0 program which invokes
> someAVcontext->flush(...) would, under 3.3, invoke someAVc->send_frame
> because of the changed layout. So it's not ABI compatible in that one
> direction that ffmpeg is supposed to be compile, either.

And if it would do that, it would violate our documented ABI/API,
because we have clear documentation stating that those parts of the
struct are not part of public ABI/API.
It may not be the cleanest thing in the world, but it is what it is,
and we have used this in various structs in the past.

- Hendrik

More information about the ffmpeg-devel mailing list