test: libtest: buffer_source: Close video device right after allocation

There's no need to keep the video device open after allocating buffers,
as V4L2 supports buffer orphaning and the exported buffers will still be
usable. Close the device right after allocation to avoid the need for
delayed cleanups.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
This commit is contained in:
Laurent Pinchart 2020-03-14 16:18:08 +02:00
parent aaf1ce50f9
commit 556e03fea7
2 changed files with 9 additions and 16 deletions

View file

@ -25,7 +25,6 @@ public:
private:
std::shared_ptr<MediaDevice> media_;
V4L2VideoDevice *video_;
std::vector<std::unique_ptr<FrameBuffer>> buffers_;
};