Much like ff_refstruct_pool_alloc_ext(), it's a wrapper around ff_refstruct_pool_alloc_ext_c().
Signed-off-by: James Almer <jamr...@gmail.com> --- libavcodec/refstruct.c | 5 ----- libavcodec/refstruct.h | 17 ++++++++++++----- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/libavcodec/refstruct.c b/libavcodec/refstruct.c index f89af156c2..13778f3f58 100644 --- a/libavcodec/refstruct.c +++ b/libavcodec/refstruct.c @@ -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), diff --git a/libavcodec/refstruct.h b/libavcodec/refstruct.h index c64ad62b6b..f9cd406bf2 100644 --- a/libavcodec/refstruct.h +++ b/libavcodec/refstruct.h @@ -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. -- 2.46.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".