mirror of https://git.ffmpeg.org/ffmpeg.git
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))
|
#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"
|
#include "libm.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue