From 69d36dd7ef259ee00e9d5737aba55dbec45d0c86 Mon Sep 17 00:00:00 2001 From: Andri Yngvason Date: Tue, 28 Jul 2020 17:32:14 +0000 Subject: [PATCH] buffer: Fix buffer attribute comparison --- src/buffer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/buffer.c b/src/buffer.c index 3cd78af..1fb3e5d 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -351,11 +351,12 @@ static bool wv_buffer_pool_match_buffer(struct wv_buffer_pool* pool, /* fall-through */ #ifdef ENABLE_SCREENCOPY_DMABUF case WV_BUFFER_DMABUF: +#endif if (pool->width != buffer->width || pool->height != buffer->height || pool->format != buffer->format) return false; -#endif + return true; case WV_BUFFER_UNSPEC: abort(); @@ -366,6 +367,7 @@ static bool wv_buffer_pool_match_buffer(struct wv_buffer_pool* pool, struct wv_buffer* wv_buffer_pool_acquire(struct wv_buffer_pool* pool) { + struct wv_buffer* buffer = TAILQ_FIRST(&pool->queue); if (buffer) { assert(wv_buffer_pool_match_buffer(pool, buffer));