[FFmpeg-devel] [PATCH] lavfi: get rid of FF_INTERNAL_FIELDS

Nicolas George george at nsup.org
Wed Feb 1 09:47:37 EET 2023


Andreas Rheinhardt (12023-02-01):
> PS: Upon rethinking, it is not only b) that contains undefined
> behaviour; it is b)-d) as well as the current code. The reason is that
> the type of AVFilterLink as seen in the files with FF_INTERNAL_FIELDS is
> not compatible with the type of AVFilterLink from the files without
> FF_INTERNAL_FIELDS. This also makes derived types, like the types of
> function declarations containing pointers to AVFilterLink incompatible
> and this is a violation of 6.2.7(2) of C11. I wonder if this will become
> a real problem with lto someday.

No: read the second half of the previous paragraph: two structures with
common first fields are compatible types. What we have been using is a
deliberately supported construct.

Regards,

-- 
  Nicolas George


More information about the ffmpeg-devel mailing list