client-node: also track memory on the server

Do the same kind of memory tracking on the server side so that we
can remove the fd from the client when unused.
This commit is contained in:
Wim Taymans 2019-07-29 17:10:15 +02:00
parent 3d2f5f2ab1
commit a7d8e7e6cc
2 changed files with 56 additions and 49 deletions

View file

@ -636,6 +636,9 @@ client_node_port_use_buffers(void *object,
SPA_MEMBER(mm->ptr, offset + sizeof(struct spa_chunk) * j,
struct spa_chunk);
if (flags & SPA_NODE_BUFFERS_FLAG_ALLOC)
continue;
if (d->type == SPA_DATA_MemId) {
uint32_t mem_id = SPA_PTR_TO_UINT32(d->data);
struct pw_memblock *bm;