v4l2bufferpool: Free orphaned allocator resources when buffers are released
authorDamian Hobson-Garcia <dhobsong@igel.co.jp>
Thu, 30 May 2019 04:12:31 +0000 (13:12 +0900)
committerTim-Philipp Müller <tim@centricular.com>
Wed, 7 Aug 2019 22:57:48 +0000 (23:57 +0100)
commite49cbdb39e0684a0e6057bcab0b7cef0aca75749
tree3ce88ffd7dc795b409e94fb8d890250195f5749c
parentd20a82aa10c347ffce172098dfa97bb61c04c8ca
v4l2bufferpool: Free orphaned allocator resources when buffers are released

Allocator resources cannot be freed when a buffer pool is orphaned
while its buffers are in use. They should, however, be freed once those
buffers are no longer needed. This patch disposes of any buffers
belonging to an orphaned pool as they are released, and makes sure
that the allocator is cleaned up when the last buffer is returned.
sys/v4l2/gstv4l2bufferpool.c