diff options
author | James Almer <jamrial@gmail.com> | 2017-03-22 15:27:30 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2017-03-23 11:44:58 -0300 |
commit | 005da88c1ee231eddd9924ad8173aeeab6366165 (patch) | |
tree | 2ccf866b5c1c921ff4922cd400a0904a05cca297 /libavcodec/mediacodec.c | |
parent | 4f727fbc7330e726d003e2961fa676ddaf86f994 (diff) | |
download | ffmpeg-005da88c1ee231eddd9924ad8173aeeab6366165.tar.gz |
avcodec/mediacodec: convert to stdatomic
Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/mediacodec.c')
-rw-r--r-- | libavcodec/mediacodec.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libavcodec/mediacodec.c b/libavcodec/mediacodec.c index 4ad5921bc2..610bb49a73 100644 --- a/libavcodec/mediacodec.c +++ b/libavcodec/mediacodec.c @@ -31,7 +31,6 @@ #include <jni.h> #include "libavcodec/avcodec.h" -#include "libavutil/atomic.h" #include "libavutil/mem.h" #include "ffjni.h" @@ -90,9 +89,9 @@ void av_mediacodec_default_free(AVCodecContext *avctx) int av_mediacodec_release_buffer(AVMediaCodecBuffer *buffer, int render) { MediaCodecDecContext *ctx = buffer->ctx; - int released = avpriv_atomic_int_add_and_fetch(&buffer->released, 1); + int released = atomic_fetch_add(&buffer->released, 1); - if (released == 1) { + if (!released) { return ff_AMediaCodec_releaseOutputBuffer(ctx->codec, buffer->index, render); } |