aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/encoder
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2026-01-21 02:24:30 +0100
committerdec05eba <dec05eba@protonmail.com>2026-01-21 02:24:30 +0100
commitede1e465039c0cb0b6517a438e12477ab0630722 (patch)
tree6425c67551a0eca14fd425711425a7c36d99aba2 /include/encoder
parent6b37b82f9798c5db21dbe83ea7bef1e91aa8acff (diff)
Fix possible replay race condition, move mutex out of replay
Diffstat (limited to 'include/encoder')
-rw-r--r--include/encoder/encoder.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/encoder/encoder.h b/include/encoder/encoder.h
index 7e550f6..22f8e9d 100644
--- a/include/encoder/encoder.h
+++ b/include/encoder/encoder.h
@@ -24,8 +24,12 @@ typedef struct {
typedef struct {
gsr_replay_buffer *replay_buffer;
+
pthread_mutex_t file_write_mutex;
- bool mutex_created;
+ bool file_write_mutex_created;
+
+ pthread_mutex_t replay_mutex;
+ bool replay_mutex_created;
gsr_encoder_recording_destination recording_destinations[GSR_MAX_RECORDING_DESTINATIONS];
size_t num_recording_destinations;