From patchwork Wed Feb 13 17:14:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 580 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 1D764610B6 for ; Wed, 13 Feb 2019 18:14:58 +0100 (CET) Received: from localhost.localdomain (cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id A6ADA9A5; Wed, 13 Feb 2019 18:14:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1550078097; bh=18IbC9OS1RlWJ0xdfXU5Yu33UXrAai8Z1rMO0LVlN1s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=S35uEVCauFfFoTtCRaH8bJXhHtpO+qQDbuGBqk/THxcgUKsc37kqFq6HoXBmPWmt9 HLq/xGejmRz8gIfUpmYXjtYMSQxnrM42xxacEhF3w78i4Zr/hyEjYjRznXzD/plyuB pi/IErpYQtYJA9UXl5IEvfdmpKewP8crV0C0s2+A= From: Kieran Bingham To: LibCamera Devel Date: Wed, 13 Feb 2019 17:14:52 +0000 Message-Id: <20190213171453.13852-3-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190213171453.13852-1-kieran.bingham@ideasonboard.com> References: <20190213171453.13852-1-kieran.bingham@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 2/3] test: v4l2_device: release capture device resources X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Feb 2019 17:14:58 -0000 Ensure that the cleanup operation releases the device and resources. Signed-off-by: Kieran Bingham Reviewed-by: Laurent Pinchart --- test/v4l2_device/v4l2_device_test.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/v4l2_device/v4l2_device_test.cpp b/test/v4l2_device/v4l2_device_test.cpp index 2bdf8cfe983a..4225291bbb6e 100644 --- a/test/v4l2_device/v4l2_device_test.cpp +++ b/test/v4l2_device/v4l2_device_test.cpp @@ -63,5 +63,9 @@ void V4L2DeviceTest::cleanup() { media_->release(); + capture_->streamOff(); + capture_->releaseBuffers(); + capture_->close(); + delete capture_; };