summaryrefslogtreecommitdiff
path: root/libavcodec/mediacodecdec_common.h
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2017-03-22 15:27:30 -0300
committerJames Almer <jamrial@gmail.com>2017-03-23 11:44:58 -0300
commit005da88c1ee231eddd9924ad8173aeeab6366165 (patch)
tree2ccf866b5c1c921ff4922cd400a0904a05cca297 /libavcodec/mediacodecdec_common.h
parent4f727fbc7330e726d003e2961fa676ddaf86f994 (diff)
downloadffmpeg-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/mediacodecdec_common.h')
-rw-r--r--libavcodec/mediacodecdec_common.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/mediacodecdec_common.h b/libavcodec/mediacodecdec_common.h
index c00c2e89f3..10f38277b5 100644
--- a/libavcodec/mediacodecdec_common.h
+++ b/libavcodec/mediacodecdec_common.h
@@ -24,6 +24,7 @@
#define AVCODEC_MEDIACODECDEC_COMMON_H
#include <stdint.h>
+#include <stdatomic.h>
#include <sys/types.h>
#include "libavutil/frame.h"
@@ -34,7 +35,7 @@
typedef struct MediaCodecDecContext {
- volatile int refcount;
+ atomic_int refcount;
char *codec_name;
@@ -88,7 +89,7 @@ typedef struct MediaCodecBuffer {
MediaCodecDecContext *ctx;
ssize_t index;
int64_t pts;
- volatile int released;
+ atomic_int released;
} MediaCodecBuffer;