diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2021-03-15 09:47:43 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2021-03-31 23:09:35 +0200 |
commit | 522a5259e9cc17faf1f83c9cfb93c960a2ecf8a2 (patch) | |
tree | 3295e8bc9fdbd84171b8d601b542324e9e1228f8 | |
parent | dfeb9b3a8b5a5680ae7d3e813314bb434b2788c4 (diff) | |
download | ffmpeg-522a5259e9cc17faf1f83c9cfb93c960a2ecf8a2.tar.gz |
avutil/common: Add FF_PTR_ADD()
Suggested-by: Andreas Rheinhardt
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavutil/internal.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavutil/internal.h b/libavutil/internal.h index 572daefec3..2ed1c2abb1 100644 --- a/libavutil/internal.h +++ b/libavutil/internal.h @@ -102,6 +102,8 @@ #define FF_ALLOC_TYPED_ARRAY(p, nelem) (p = av_malloc_array(nelem, sizeof(*p))) #define FF_ALLOCZ_TYPED_ARRAY(p, nelem) (p = av_mallocz_array(nelem, sizeof(*p))) +#define FF_PTR_ADD(ptr, off) ((off) ? (ptr) + (off) : (ptr)) + #include "libm.h" /** |