diff --git a/mediapipe/framework/scheduler.h b/mediapipe/framework/scheduler.h index b59467b9f..8a6d079e3 100644 --- a/mediapipe/framework/scheduler.h +++ b/mediapipe/framework/scheduler.h @@ -310,7 +310,7 @@ class Scheduler { absl::Mutex state_mutex_; // Current state of the scheduler. - std::atomic state_ = ATOMIC_VAR_INIT(STATE_NOT_STARTED); + std::atomic state_ = STATE_NOT_STARTED; // True if all graph input streams are closed. bool graph_input_streams_closed_ ABSL_GUARDED_BY(state_mutex_) = false; diff --git a/mediapipe/gpu/gl_context.h b/mediapipe/gpu/gl_context.h index 4f2390404..fba0267a8 100644 --- a/mediapipe/gpu/gl_context.h +++ b/mediapipe/gpu/gl_context.h @@ -454,8 +454,8 @@ class GlContext : public std::enable_shared_from_this { // Number of glFinish calls completed on the GL thread. // Changes should be guarded by mutex_. However, we use simple atomic // loads for efficiency on the fast path. - std::atomic gl_finish_count_ = ATOMIC_VAR_INIT(0); - std::atomic gl_finish_count_target_ = ATOMIC_VAR_INIT(0); + std::atomic gl_finish_count_ = 0; + std::atomic gl_finish_count_target_ = 0; GlContext* context_waiting_on_ ABSL_GUARDED_BY(mutex_) = nullptr;