aboutsummaryrefslogtreecommitdiff
path: root/ringbuf.c
diff options
context:
space:
mode:
authorMistivia <i@mistivia.com>2025-09-13 14:07:15 +0800
committerMistivia <i@mistivia.com>2025-09-13 14:07:15 +0800
commitae14c862d2a3a4ce38c6fbc6ae317b56f8ff4d92 (patch)
treefe886720e7fac5f91830b5761a71a60934e1fac5 /ringbuf.c
parente0ee036ebc12598fdb6261ee3036919ac440a724 (diff)
fix output stream index bug
Diffstat (limited to 'ringbuf.c')
-rw-r--r--ringbuf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ringbuf.c b/ringbuf.c
index 876e590..29301e5 100644
--- a/ringbuf.c
+++ b/ringbuf.c
@@ -81,7 +81,7 @@ size_t RingBuffer_read(RingBuffer *self, uint8_t *data, size_t len) {
pthread_mutex_lock(&self->mutex);
while (read < len) {
- while (RingBuffer_space(self) == 0) {
+ while (RingBuffer_size(self) == 0) {
if (self->finished_flag) {
goto end;
}