va: dmabuf issues with allocator pool
There are two problems with the current dmabuf allocator pool
-
If the a buffer has several planes and those planes are in different GstMemories: the return of that set of memories to the allocator pool are not atomic, so when populating a new buffer, the memories in the pool might not be complete: see #1520 (closed)
-
Downstream can return the buffer to upstream bufferpool, but hold the memories (common case with dmabuf), in that case we have returned buffers without returned memories, so acquiring a new buffer might not found spare memories, creating a lock. This can be reproduced with reverse playback