Message ID | 20210724152947.258052-1-george@nsup.org |
---|---|
State | Accepted |
Commit | 1d8e1afc009f2a916f672fc57f4971504bb13fb3 |
Headers | show |
Series | [FFmpeg-devel,1/2] lavu/internal: add FF_FIELD_AT(). | expand |
Context | Check | Description |
---|---|---|
andriy/x86_make | success | Make finished |
andriy/x86_make_fate | success | Make fate finished |
andriy/PPC64_make | success | Make finished |
andriy/PPC64_make_fate | success | Make fate finished |
Nicolas George (12021-07-24): > Signed-off-by: Nicolas George <george@nsup.org> > --- > libavutil/internal.h | 5 +++++ > 1 file changed, 5 insertions(+) Will push soon unless somebody wants to comment. Regards,
Nicolas George (12021-07-24): > Signed-off-by: Nicolas George <george@nsup.org> > --- > libavutil/internal.h | 5 +++++ > 1 file changed, 5 insertions(+) Patch series pushed after more time than expected. Regards,
diff --git a/libavutil/internal.h b/libavutil/internal.h index a33e8700c3..2011813932 100644 --- a/libavutil/internal.h +++ b/libavutil/internal.h @@ -103,6 +103,11 @@ #define FF_PTR_ADD(ptr, off) ((off) ? (ptr) + (off) : (ptr)) +/** + * Access a field in a structure by its offset. + */ +#define FF_FIELD_AT(type, off, obj) (*(type *)((char *)&(obj) + (off))) + #include "libm.h" /**
Signed-off-by: Nicolas George <george@nsup.org> --- libavutil/internal.h | 5 +++++ 1 file changed, 5 insertions(+)