From d17953b287e0fa9d61c9aada7e36c03403b2fd69 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Thu, 4 Aug 2022 10:16:51 +0200 Subject: lavu/buffer: convert to AVRefcount WIP --- libavutil/buffer_internal.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'libavutil/buffer_internal.h') diff --git a/libavutil/buffer_internal.h b/libavutil/buffer_internal.h index adb916aaa2..29119b47ab 100644 --- a/libavutil/buffer_internal.h +++ b/libavutil/buffer_internal.h @@ -23,6 +23,7 @@ #include #include "buffer.h" +#include "refcount.h" #include "thread.h" /** @@ -39,6 +40,8 @@ struct AVBuffer { uint8_t *data; /**< data described by this buffer */ size_t size; /**< size of data in bytes */ + AVRefcount rc; + /** * number of existing AVBufferRef instances referring to this buffer */ @@ -98,7 +101,7 @@ struct AVBufferPool { * buffers have been released, then it's safe to free the pool and all * the buffers in it. */ - atomic_uint refcount; + AVRefcount rc; size_t size; void *opaque; -- cgit v1.2.3