summaryrefslogtreecommitdiff
path: root/modules/theora
diff options
context:
space:
mode:
authorPedro J. Estébanez <pedrojrulez@gmail.com>2021-02-10 19:22:13 +0100
committerPedro J. Estébanez <pedrojrulez@gmail.com>2021-02-18 17:12:46 +0100
commit8e128726f0eac1982aa75a005554ee5b556b332e (patch)
tree827c2f478e8fb3196ef411f4941fa4e839642e31 /modules/theora
parent8870f43d742e0c48ae543d999856f5989170b62d (diff)
Modernize atomics
- Based on C++11's `atomic` - Reworked `SafeRefCount` (based on the rewrite by @hpvb) - Replaced free atomic functions by the new `SafeNumeric<T>` - Replaced wrong cases of `volatile bool` by the new `SafeFlag` - Platform-specific implementations no longer needed Co-authored-by: Hein-Pieter van Braam-Stewart <hp@tmm.cx>
Diffstat (limited to 'modules/theora')
-rw-r--r--modules/theora/video_stream_theora.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/theora/video_stream_theora.h b/modules/theora/video_stream_theora.h
index f92fe2340e..2685a8a013 100644
--- a/modules/theora/video_stream_theora.h
+++ b/modules/theora/video_stream_theora.h
@@ -36,6 +36,7 @@
#include "core/os/semaphore.h"
#include "core/os/thread.h"
#include "core/templates/ring_buffer.h"
+#include "core/templates/safe_refcount.h"
#include "scene/resources/video_stream.h"
#include "servers/audio_server.h"
@@ -113,7 +114,7 @@ class VideoStreamPlaybackTheora : public VideoStreamPlayback {
bool thread_eof = false;
Semaphore *thread_sem;
Thread thread;
- volatile bool thread_exit = false;
+ SafeFlag thread_exit;
static void _streaming_thread(void *ud);