From a3f5c002bb2a896ea49fb95ee94a15055fb0af78 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Thu, 7 Apr 2022 19:09:35 +0200 Subject: [PATCH] Fix buffer reenqueing --- hw/buffer_queue.c | 2 +- hw/links.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/buffer_queue.c b/hw/buffer_queue.c index d74da43..3677e56 100644 --- a/hw/buffer_queue.c +++ b/hw/buffer_queue.c @@ -68,7 +68,7 @@ error: { buffer_t *mmap_source = buf->mmap_source; buf->mmap_source = NULL; - buf->mmap_reflinks--; + buf->mmap_reflinks++; pthread_mutex_unlock(&buffer_lock); if (mmap_source) { diff --git a/hw/links.c b/hw/links.c index df6bf6d..688fc18 100644 --- a/hw/links.c +++ b/hw/links.c @@ -196,7 +196,7 @@ int links_step(link_t *all_links, int *timeout_ms) return -1; } - // feed capture queue (two buffers max) + // feed capture queue (two buffers) if (!buf_list->device->paused && buf_list->do_capture && buf_list->do_mmap) { buffer_t *buf; int count_enqueued = buffer_list_count_enqueued(buf_list);