libcamera: Always check return value of MediaDevice::acquire()
In preparation for adding more responsibility to MediaDevice::acquire() remove unneeded calls to acquire() and release(), and make sure all needed calls to acquire() are checked and acted on. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
b9a47058eb
commit
12053cf8e6
6 changed files with 13 additions and 20 deletions
|
@ -46,8 +46,6 @@ int V4L2DeviceTest::init()
|
|||
if (!media_)
|
||||
return TestSkip;
|
||||
|
||||
media_->acquire();
|
||||
|
||||
MediaEntity *entity = media_->getEntityByName("vivid-000-vid-cap");
|
||||
if (!entity)
|
||||
return TestSkip;
|
||||
|
@ -61,8 +59,6 @@ int V4L2DeviceTest::init()
|
|||
|
||||
void V4L2DeviceTest::cleanup()
|
||||
{
|
||||
media_->release();
|
||||
|
||||
capture_->streamOff();
|
||||
capture_->releaseBuffers();
|
||||
capture_->close();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue