File 0009-impl-core-clear-the-mempool.patch of Package pipewire.15840

From f78e44c28ac1767ee1ae916b0d4bb8f2d19dd2d6 Mon Sep 17 00:00:00 2001
From: Wim Taymans <wtaymans@redhat.com>
Date: Fri, 19 Jun 2020 15:20:50 +0200
Subject: [PATCH] impl-core: clear the mempool

When a client sends hello, clear the mempool again to make sure
it get's the new memory.
---
 src/pipewire/impl-core.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/pipewire/impl-core.c b/src/pipewire/impl-core.c
index e1b494e4..103c2863 100644
--- a/src/pipewire/impl-core.c
+++ b/src/pipewire/impl-core.c
@@ -162,6 +162,8 @@ static int core_hello(void *object, uint32_t version)
 	pw_log_debug(NAME" %p: hello %d from resource %p", context, version, resource);
 	pw_map_for_each(&client->objects, destroy_resource, client);
 
+	pw_mempool_clear(client->pool);
+
 	this->info.change_mask = PW_CORE_CHANGE_MASK_ALL;
 	pw_core_resource_info(resource, &this->info);
 
openSUSE Build Service is sponsored by