libcamera: pipeline: Fix double release of media devices
Media devices are acquired in the match() function of pipeline handlers, and explicitly released if no match is found. The pipeline handler is then deleted, which causes a second release of the media device in the destructor. Fix this by removing the explicit release in the match() function. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Acked-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
parent
3ab7f65d6f
commit
e6eff721d7
3 changed files with 12 additions and 22 deletions
|
@ -165,11 +165,8 @@ bool PipelineHandlerVimc::match(DeviceEnumerator *enumerator)
|
|||
media_->acquire();
|
||||
|
||||
video_ = new V4L2Device(media_->getEntityByName("Raw Capture 1"));
|
||||
|
||||
if (video_->open()) {
|
||||
media_->release();
|
||||
if (video_->open())
|
||||
return false;
|
||||
}
|
||||
|
||||
std::set<Stream *> streams{ &stream_ };
|
||||
std::shared_ptr<Camera> camera = Camera::create(this, "VIMC Sensor B",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue