From patchwork Thu Jul 15 14:00:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 12960 X-Patchwork-Delegate: kieran.bingham@ideasonboard.com Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 48AE2C3226 for ; Thu, 15 Jul 2021 14:00:17 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 546A76852A; Thu, 15 Jul 2021 16:00:16 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="MNn5THJN"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 1277B60282 for ; Thu, 15 Jul 2021 16:00:15 +0200 (CEST) Received: from Monstersaurus.local (cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 7F9D2340; Thu, 15 Jul 2021 16:00:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1626357614; bh=LtUJchNdY8krzZaX2SV2x/rp+zOSEvyWrIG2jsvInjY=; h=From:To:Cc:Subject:Date:From; b=MNn5THJNN0gJhftZTnBWN4h8rai2LZBlefKKCjB5iDhiamx1eCnf58U4IXZUWp3ud V6YorLf6Pmv5SLm8h5019hqb6rCPML+5iuci+3bJrcYNro6Jv2Oh0n1ZTndveTH2QF SIUzZnzof2lhS004STObTTWpEqrL7QkJGZt2YqAU= From: Kieran Bingham To: libcamera devel Date: Thu, 15 Jul 2021 15:00:11 +0100 Message-Id: <20210715140011.122598-1-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] android: camera_capabilities: Ensure PixelArrayActiveAreas exists before accessing X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The VIVID pipline handler does not set this. It's likely that the UVC pipeline will not either. If not present, we must not access it. Signed-off-by: Kieran Bingham --- src/android/camera_capabilities.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/android/camera_capabilities.cpp b/src/android/camera_capabilities.cpp index 6b5edb66fad2..dfc961affe46 100644 --- a/src/android/camera_capabilities.cpp +++ b/src/android/camera_capabilities.cpp @@ -589,7 +589,7 @@ int CameraCapabilities::initializeStaticMetadata() physicalSize); } - { + if (properties.contains(properties::PixelArrayActiveAreas)) { const Span &rects = properties.get(properties::PixelArrayActiveAreas); std::vector data{