aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil/buffer_internal.h
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2016-07-17 22:24:35 +0200
committerAnton Khirnov <anton@khirnov.net>2016-10-02 18:58:04 +0200
commit27079a426c9d3db918b158976e44b9b143d78e1c (patch)
treec8a7b552da045214c4a36bad63ffd625b11bd44d /libavutil/buffer_internal.h
parenteb34d40354e2474517c9b9bd787e0dadc89c2a81 (diff)
downloadffmpeg-27079a426c9d3db918b158976e44b9b143d78e1c.tar.gz
buffer: convert to stdatomic
Diffstat (limited to 'libavutil/buffer_internal.h')
-rw-r--r--libavutil/buffer_internal.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavutil/buffer_internal.h b/libavutil/buffer_internal.h
index 64344d8262..90d68aacac 100644
--- a/libavutil/buffer_internal.h
+++ b/libavutil/buffer_internal.h
@@ -19,6 +19,7 @@
#ifndef AVUTIL_BUFFER_INTERNAL_H
#define AVUTIL_BUFFER_INTERNAL_H
+#include <stdatomic.h>
#include <stdint.h>
#include "buffer.h"
@@ -40,7 +41,7 @@ struct AVBuffer {
/**
* number of existing AVBufferRef instances referring to this buffer
*/
- volatile int refcount;
+ atomic_uint refcount;
/**
* a callback for freeing the data
@@ -85,7 +86,7 @@ struct AVBufferPool {
* buffers have been released, then it's safe to free the pool and all
* the buffers in it.
*/
- volatile int refcount;
+ atomic_uint refcount;
int size;
void *opaque;