Signed-off-by: Nicolas George <geo...@nsup.org>
---
 libavutil/internal.h | 5 +++++
 1 file changed, 5 insertions(+)

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"
 
 /**
-- 
2.30.2

_______________________________________________
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".

Reply via email to