[FFmpeg-devel] [PATCH 3/4] avcodec/codec: Reorder elements to make AVCodec smaller

Nicolas George george at nsup.org
Wed Aug 4 19:36:23 EEST 2021


Andreas Rheinhardt (12021-08-04):
> Reordering max_lowres is an ABI break.
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
> ---
>  libavcodec/codec.h | 13 +++++++------
>  1 file changed, 7 insertions(+), 6 deletions(-)

If it breaks API, then I would rather see it done properly rather than
fortuitously: move capabilities and max_lowres after all the pointers.

For reference, the robust way of avoiding padding in structures is to
order fields by decreasing size. Since the public part of AVCodec
changes rarely, once it is done, it should mostly hold.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20210804/0d73c58a/attachment.sig>


More information about the ffmpeg-devel mailing list