mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-07 15:22:57 +00:00
lavu/internal: add FF_FIELD_AT().
This commit is contained in:
parent
1c5610824a
commit
1d8e1afc00
@ -99,6 +99,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"
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user