X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavutil%2Fbuffer_internal.h;h=0b549e3a5349661798369793ea827b5daf43c6b8;hb=14040a1d913794d9a3fd6406a6d8c2f0e37e0062;hp=54b67047e5e54d8ea54ca0567c067ea42200832a;hpb=47e12966b75490cfa5fb8ed65a48a9a3d84a7bce;p=ffmpeg diff --git a/libavutil/buffer_internal.h b/libavutil/buffer_internal.h index 54b67047e5e..0b549e3a534 100644 --- a/libavutil/buffer_internal.h +++ b/libavutil/buffer_internal.h @@ -25,18 +25,14 @@ #include "buffer.h" #include "thread.h" -/** - * The buffer is always treated as read-only. - */ -#define BUFFER_FLAG_READONLY (1 << 0) /** * The buffer was av_realloc()ed, so it is reallocatable. */ -#define BUFFER_FLAG_REALLOCATABLE (1 << 1) +#define BUFFER_FLAG_REALLOCATABLE (1 << 0) struct AVBuffer { uint8_t *data; /**< data described by this buffer */ - int size; /**< size of data in bytes */ + buffer_size_t size; /**< size of data in bytes */ /** * number of existing AVBufferRef instances referring to this buffer @@ -54,9 +50,14 @@ struct AVBuffer { void *opaque; /** - * A combination of BUFFER_FLAG_* + * A combination of AV_BUFFER_FLAG_* */ int flags; + + /** + * A combination of BUFFER_FLAG_* + */ + int flags_internal; }; typedef struct BufferPoolEntry { @@ -88,10 +89,10 @@ struct AVBufferPool { */ atomic_uint refcount; - int size; + buffer_size_t size; void *opaque; - AVBufferRef* (*alloc)(int size); - AVBufferRef* (*alloc2)(void *opaque, int size); + AVBufferRef* (*alloc)(buffer_size_t size); + AVBufferRef* (*alloc2)(void *opaque, buffer_size_t size); void (*pool_free)(void *opaque); };