lavu/internal: add FF_FIELD_AT().

pull/364/head
Nicolas George 3 years ago
parent 1c5610824a
commit 1d8e1afc00
  1. 5
      libavutil/internal.h

@ -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…
Cancel
Save