@@ -332,11 +332,6 @@ static void refstruct_pool_uninit(FFRefStructOpaque unused, void *obj)
}
}
-FFRefStructPool *ff_refstruct_pool_alloc(size_t size, unsigned flags)
-{
- return ff_refstruct_pool_alloc_ext(size, flags, NULL, NULL, NULL, NULL, NULL);
-}
-
FFRefStructPool *ff_refstruct_pool_alloc_ext_c(size_t size, unsigned flags,
FFRefStructOpaque opaque,
int (*init_cb)(FFRefStructOpaque opaque, void *obj),
@@ -220,11 +220,6 @@ typedef struct FFRefStructPool FFRefStructPool;
*/
#define FF_REFSTRUCT_POOL_FLAG_ZERO_EVERY_TIME (1 << 18)
-/**
- * Equivalent to ff_refstruct_pool_alloc(size, flags, NULL, NULL, NULL, NULL, NULL)
- */
-FFRefStructPool *ff_refstruct_pool_alloc(size_t size, unsigned flags);
-
/**
* Allocate an FFRefStructPool, potentially using complex callbacks.
*
@@ -266,6 +261,18 @@ FFRefStructPool *ff_refstruct_pool_alloc_ext(size_t size, unsigned flags,
init_cb, reset_cb, free_entry_cb, free_cb);
}
+/**
+ * A wrapper around ff_refstruct_pool_alloc_ext_c() for the common case
+ * of no custom callbacks.
+ *
+ * @see ff_refstruct_pool_alloc_ext_c()
+ */
+static inline
+FFRefStructPool *ff_refstruct_pool_alloc(size_t size, unsigned flags)
+{
+ return ff_refstruct_pool_alloc_ext(size, flags, NULL, NULL, NULL, NULL, NULL);
+}
+
/**
* Get an object from the pool, reusing an old one from the pool when
* available.
Much like ff_refstruct_pool_alloc_ext(), it's a wrapper around ff_refstruct_pool_alloc_ext_c(). Signed-off-by: James Almer <jamrial@gmail.com> --- libavcodec/refstruct.c | 5 ----- libavcodec/refstruct.h | 17 ++++++++++++----- 2 files changed, 12 insertions(+), 10 deletions(-)