avutil/buffer: separate public and internal flags inside AVBuffers
It's better to not mix user provided flags and internal flags set by AVBufferRef helper functions. Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
@@ -25,14 +25,10 @@
|
||||
#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 */
|
||||
@@ -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 {
|
||||
|
Reference in New Issue
Block a user