summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/msg.c2
-rw-r--r--filters/f_async_queue.c2
-rw-r--r--misc/thread_tools.c2
-rw-r--r--osdep/windows_utils.c2
-rw-r--r--sub/osd.c2
-rw-r--r--video/out/dr_helper.c2
6 files changed, 6 insertions, 6 deletions
diff --git a/common/msg.c b/common/msg.c
index 0984cf0f5e..c2ec9e26ee 100644
--- a/common/msg.c
+++ b/common/msg.c
@@ -524,7 +524,7 @@ void mp_msg_init(struct mpv_global *global)
struct mp_log_root *root = talloc_zero(NULL, struct mp_log_root);
*root = (struct mp_log_root){
.global = global,
- .reload_counter = ATOMIC_VAR_INIT(1),
+ .reload_counter = 1,
};
pthread_mutex_init(&root->lock, NULL);
diff --git a/filters/f_async_queue.c b/filters/f_async_queue.c
index ef8ae15946..80c330524a 100644
--- a/filters/f_async_queue.c
+++ b/filters/f_async_queue.c
@@ -73,7 +73,7 @@ struct mp_async_queue *mp_async_queue_create(void)
struct mp_async_queue *r = talloc_zero(NULL, struct mp_async_queue);
r->q = talloc_zero(NULL, struct async_queue);
*r->q = (struct async_queue){
- .refcount = ATOMIC_VAR_INIT(1),
+ .refcount = 1,
};
pthread_mutex_init(&r->q->lock, NULL);
talloc_set_destructor(r, on_free_queue);
diff --git a/misc/thread_tools.c b/misc/thread_tools.c
index e97c51d07e..d75a37be78 100644
--- a/misc/thread_tools.c
+++ b/misc/thread_tools.c
@@ -126,7 +126,7 @@ struct mp_cancel *mp_cancel_new(void *talloc_ctx)
struct mp_cancel *c = talloc_ptrtype(talloc_ctx, c);
talloc_set_destructor(c, cancel_destroy);
*c = (struct mp_cancel){
- .triggered = ATOMIC_VAR_INIT(false),
+ .triggered = false,
.wakeup_pipe = {-1, -1},
};
pthread_mutex_init(&c->lock, NULL);
diff --git a/osdep/windows_utils.c b/osdep/windows_utils.c
index 6a5abff291..b83a7ced9c 100644
--- a/osdep/windows_utils.c
+++ b/osdep/windows_utils.c
@@ -164,7 +164,7 @@ char *mp_HRESULT_to_str_buf(char *buf, size_t buf_size, HRESULT hr)
bool mp_w32_create_anon_pipe(HANDLE *server, HANDLE *client,
struct w32_create_anon_pipe_opts *opts)
{
- static atomic_ulong counter = ATOMIC_VAR_INIT(0);
+ static atomic_ulong counter = 0;
// Generate pipe name
unsigned long id = atomic_fetch_add(&counter, 1);
diff --git a/sub/osd.c b/sub/osd.c
index fcdc7dd4df..88baecb768 100644
--- a/sub/osd.c
+++ b/sub/osd.c
@@ -126,7 +126,7 @@ struct osd_state *osd_create(struct mpv_global *global)
.opts_cache = m_config_cache_alloc(osd, global, &mp_osd_render_sub_opts),
.global = global,
.log = mp_log_new(osd, global->log, "osd"),
- .force_video_pts = ATOMIC_VAR_INIT(MP_NOPTS_VALUE),
+ .force_video_pts = MP_NOPTS_VALUE,
.stats = stats_ctx_create(osd, global, "osd"),
};
pthread_mutex_init(&osd->lock, NULL);
diff --git a/video/out/dr_helper.c b/video/out/dr_helper.c
index e681b1aa35..a381923526 100644
--- a/video/out/dr_helper.c
+++ b/video/out/dr_helper.c
@@ -44,7 +44,7 @@ struct dr_helper *dr_helper_create(struct mp_dispatch_queue *dispatch,
talloc_set_destructor(dr, dr_helper_destroy);
*dr = (struct dr_helper){
.dispatch = dispatch,
- .dr_in_flight = ATOMIC_VAR_INIT(0),
+ .dr_in_flight = 0,
.get_image = get_image,
.get_image_ctx = get_image_ctx,
};