Skip to content
Snippets Groups Projects
Commit 80661e0f authored by Clément Bœsch's avatar Clément Bœsch
Browse files

buffer: use the atomic get instead of the add and fetch variant.

parent 1ad542f1
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment