When closing down an active stream, the V4L2Device reports that buffers can not
be released.
This turns out to be a two part problem.
Firstly, exported buffers duplicate the dmabuf file handle for internal storage
- but the first handle was not released. The first patch solves this by
releasing the handle after it has been associated with the buffer.
The second issue is that the V4L2Device is asked to free buffers /before/ they
have been released. Resolve this issue by destroying the bufferpool contents
before calling down to the pipeline handler to free all buffers.
Kieran Bingham (2):
libcamera: v4l2_device: Close Plane dmabuf fd
libcamera: camera: Unmap buffers before release
src/libcamera/camera.cpp | 7 ++++++-
src/libcamera/v4l2_device.cpp | 1 +
2 files changed, 7 insertions(+), 1 deletion(-)