[FFmpeg-devel] [PATCH V7 4/6] lavu: add side data AV_FRAME_DATA_BOUNDING_BOXES

Nicolas George george at nsup.org
Wed Apr 7 17:47:23 EEST 2021


Andreas Rheinhardt (12021-04-07):
> > +    ret->header.bboxes_offset = (char *)&ret->boxes - (char *)&ret->header;
> 
> Using offsetof would be clearer (for this you have to declare a proper
> type).

I find this version rather clearer. offsetof is good we we do not have a
pointer to do the actual arithmetic on, but here we have, and we define
the offset by the exact difference between the pointer we want.

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/20210407/756c9feb/attachment.sig>


More information about the ffmpeg-devel mailing list