From a macro point of view, I like your general approach using tables.
It really simplifies everything a lot.
(Rereading my old approach I don't know why I totally forgot that
there is a generic way to know the size of the internal buffers
(namely size of the AVBufferRefs). Not thinking of this, I
Use the unit type table to determine what we need to do to clone the
internals of the unit content. (Will still fail for units with complex
content if they do not have a defined clone function.)
Setup and naming from a patch by Andreas Rheinhardt
, but with the implementation
changed to use the u