In the code we do transmute between v4l2_plane__bindgen_ty_1 and v4l2_buffer__bindgen_ty_1, but as has been pointed out to me this is not necessarily safe because they may not be the same size on platforms for which sizeof(c_ulong) != sizeof(*mut).
It would probably be safer to move this into a helper that copies the appropriate member explicitly depending on the memory type of the buffer.
In the code we do transmute between
v4l2_plane__bindgen_ty_1
andv4l2_buffer__bindgen_ty_1
, but as has been pointed out to me this is not necessarily safe because they may not be the same size on platforms for whichsizeof(c_ulong) != sizeof(*mut)
.It would probably be safer to move this into a helper that copies the appropriate member explicitly depending on the memory type of the buffer.