mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-24 03:39:45 +00:00
buffer: use the atomic get instead of the add and fetch variant.
This commit is contained in:
parent
1ad542f11f
commit
80661e0f55
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user