va: allocator: dmabuf: destroy VASurface if no pooled buffer
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Fri, 13 Nov 2020 19:20:47 +0000 (20:20 +0100)
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Sun, 15 Nov 2020 08:52:01 +0000 (09:52 +0100)
commita1e8cb76e79ec8ca69ec048f37e54760a8f30798
tree107bb4817145ec5bd84e0916ce463198382bce61
parent9011a58491b089461762a8f550892de434af5c29
va: allocator: dmabuf: destroy VASurface if no pooled buffer

When gst_va_dmabuf_allocator_setup_buffer_full() receives info (not NULL) it is
supposed that this buffer is not part of the allocator pool, so it has to be
de-allocated as soon it is freed.

This patch sets the destroy notify of the assigned GstVaBufferSurface if info is
not NULL.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1811>
sys/va/gstvaallocator.c