aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil/buffer.c
diff options
context:
space:
mode:
authorClément Bœsch <ubitux@gmail.com>2013-03-12 08:31:28 +0100
committerClément Bœsch <ubitux@gmail.com>2013-03-12 12:12:49 +0100
commit80661e0f5586dfa561a3eb461464530c74a58b1d (patch)
tree1dbda5505ed124d45c873d8cd1b9636724887f01 /libavutil/buffer.c
parent1ad542f11f4717a9dee19d46f4da5ce3f6beb449 (diff)
downloadffmpeg-80661e0f5586dfa561a3eb461464530c74a58b1d.tar.gz
buffer: use the atomic get instead of the add and fetch variant.
Diffstat (limited to 'libavutil/buffer.c')
-rw-r--r--libavutil/buffer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavutil/buffer.c b/libavutil/buffer.c
index 21e102d8e0..d268a7f604 100644
--- a/libavutil/buffer.c
+++ b/libavutil/buffer.c
@@ -122,7 +122,7 @@ int av_buffer_is_writable(const AVBufferRef *buf)
if (buf->buffer->flags & AV_BUFFER_FLAG_READONLY)
return 0;
- return avpriv_atomic_int_add_and_fetch(&buf->buffer->refcount, 0) == 1;
+ return avpriv_atomic_int_get(&buf->buffer->refcount) == 1;
}
int av_buffer_make_writable(AVBufferRef **pbuf)