[FFmpeg-devel] ABI and forks
Michael Niedermayer
michaelni
Fri Feb 11 15:20:33 CET 2011
Hi
As ffmpeg has become a 2 headed dragon theres the issue with ABI compatibility.
If one side adds a field to a struct and the other adds another field
This could be avoided with a bit of cooperation but as much as i would love
cooperation, that works only when both sides want it.
Luckily this problem can be reduced by using AVOptions to access fields.
A missing field will not read/write to random memory and a field in a different
location will just work as if it was at the expected place, also a field could
change from int<->float and it still would work.
So i strongly recommand all applications to use av_get/set_int() and similar
functions from libavutil/opt.h whenever possible. Especially with recently
added fields that might not exist accross all forks in the same place
Also, its very important that we add AVClass members to as many public structs
as possible when the major version is bumped so AVOptions can be used with
more structs and ABI compatibility issues between forks are avoided
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Republics decline into democracies and democracies degenerate into
despotisms. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20110211/9e59ceb5/attachment.pgp>
More information about the ffmpeg-devel
mailing list