diff options
| author | Mistivia <i@mistivia.com> | 2025-09-13 14:17:36 +0800 |
|---|---|---|
| committer | Mistivia <i@mistivia.com> | 2025-09-13 14:17:36 +0800 |
| commit | 7540ded75ee07b026950486172aca08cd0686a4e (patch) | |
| tree | 6512c70b3216d32f2eeb030e7b14f40b740d7b66 /ringbuf.c | |
| parent | ae14c862d2a3a4ce38c6fbc6ae317b56f8ff4d92 (diff) | |
transcode talker
Diffstat (limited to 'ringbuf.c')
| -rw-r--r-- | ringbuf.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -1,5 +1,6 @@ #include "ringbuf.h" +#include <pthread.h> #include <string.h> void RingBuffer_init(RingBuffer *self, size_t size) { @@ -46,6 +47,7 @@ void RingBuffer_end(RingBuffer *self) { pthread_mutex_lock(&self->mutex); self->finished_flag = true; pthread_mutex_unlock(&self->mutex); + pthread_cond_signal(&self->not_empty_cond); } size_t RingBuffer_write(RingBuffer *self, const uint8_t *data, size_t len) { |
