From patchwork Tue May 14 18:02:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= X-Patchwork-Id: 20046 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 C5EF0BDE6B for ; Tue, 14 May 2024 18:02:14 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id C17D96347E; Tue, 14 May 2024 20:02:13 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=protonmail.com header.i=@protonmail.com header.b="L0XBuO9l"; dkim-atps=neutral Received: from mail-40131.protonmail.ch (mail-40131.protonmail.ch [185.70.40.131]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id C982963469 for ; Tue, 14 May 2024 20:02:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1715709732; x=1715968932; bh=81fQnMoOXMbrheRcEvLXSXz2KSHxhazfMAT5iS6lImM=; h=Date:To:From:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=L0XBuO9lDRhO13UrBe3Ai/8BnWwAa02qyulPFKuSYCOl2oC98tXBdUJdWQ2j2WHui fSc9rBvTZyVGjzb1j9pG3HtU33JZ3XC4RtaUPhZIvFQ3r72f00cFGc3NbWzK74Pb5F SvJLvLkZCPFRRI0Rap4xSNpi4i2172LIocjVR8rx1BvYfrwvUApfFrAJtg/iiZRkFl EvSsRSdpxwiRMAxToFg6oOE1+bjWLmeno1vZ0D3nNC1lckZovXa9jFxZMck32lpDgB SnkaYKEUbgmZysxLUReIYfJ13lsLr1+nMQcsj6H6SeO5DOIkxU6If7JPt8n4zHvGeV 7WQ7/0GnaV+hw== Date: Tue, 14 May 2024 18:02:07 +0000 To: libcamera-devel@lists.libcamera.org From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= Subject: [PATCH v1] gstreamer: Use copied camera name Message-ID: <20240514180206.198938-1-pobrn@protonmail.com> Feedback-ID: 20568564:user:proton X-Pm-Message-ID: 81c8ef6027cd6d9ac5e817ffb6c764a416249441 MIME-Version: 1.0 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" It seems the intent is to use the copied camera name to avoid concurrency problems related to `gst_libcamera_src_set_property()`. However, the current code makes the copy, but does not actually use it. So fix that. Fixes: 58feb69f852289 ("gst: libcamerasrc: Implement selection and acquisition") Signed-off-by: Barnabás Pőcze Reviewed-by: Laurent Pinchart Reviewed-by: Nicolas Dufresne --- src/gstreamer/gstlibcamerasrc.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gstreamer/gstlibcamerasrc.cpp b/src/gstreamer/gstlibcamerasrc.cpp index a284110b..9680d809 100644 --- a/src/gstreamer/gstlibcamerasrc.cpp +++ b/src/gstreamer/gstlibcamerasrc.cpp @@ -377,10 +377,10 @@ gst_libcamera_src_open(GstLibcameraSrc *self) } if (camera_name) { - cam = cm->get(self->camera_name); + cam = cm->get(camera_name); if (!cam) { GST_ELEMENT_ERROR(self, RESOURCE, NOT_FOUND, - ("Could not find a camera named '%s'.", self->camera_name), + ("Could not find a camera named '%s'.", camera_name), ("libcamera::CameraMananger::get() returned nullptr")); return false; }