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
signature.asc
Description: PGP signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".