On Sat, Apr 22, 2017 at 8:57 PM, Nicolas George <geo...@nsup.org> wrote: > Le tridi 3 floréal, an CCXXV, Aaron Levinson a écrit : >> Then why have the accessors at all if the fields are public? > > To ensure ABI compatibility with the fork, which has been dropped. >
To elaborate on that, the accessors existed primarily for fields which only exist in FFmpeg, and not in Libav, so that when Libav added a field, we could add it in the same position as them, and preserve ABI compatibility to Libav (ie. having all fields in the struct in the same place). Due to this practice, any fields Libav didn't have had to be at the end of the struct, and they would move everytime a new field was added on Libavs side (which would end up before the FFmpeg-only fields) - hence accessors to work around the constant ABI changes to these fields. But we have decided a while ago that we do no longer want to pretent to maintain ABI compat (it was never fully functional and basically untested), and as such there is no need to have them anymore (it was a bit clumsy to use either way, as only a minority of fields had them, so it was easy to use it wrong). On top of these changes, the accessors should also be deprecated and then eventually removed (after the typical deprecation period), and all public fields in the structs accessed directly again. - Hendrik _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel