{"id":16439,"url":"https://patchwork.libcamera.org/api/patches/16439/?format=json","web_url":"https://patchwork.libcamera.org/patch/16439/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20220630000251.31295-3-laurent.pinchart@ideasonboard.com>","date":"2022-06-30T00:02:41","name":"[libcamera-devel,v2,02/12] gstreamer: Move variable to loop scope","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"ba9e0d73f2364d06ad16a81eaff00c29e0b2a6f9","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/?format=json","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/16439/mbox/","series":[{"id":3234,"url":"https://patchwork.libcamera.org/api/series/3234/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3234","date":"2022-06-30T00:02:39","name":"gstreamer: Queue multiple requests","version":2,"mbox":"https://patchwork.libcamera.org/series/3234/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/16439/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/16439/checks/","tags":{},"headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id D5289BD808\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 30 Jun 2022 00:03:22 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5A65365636;\n\tThu, 30 Jun 2022 02:03:18 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id DC4A665631\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 30 Jun 2022 02:03:15 +0200 (CEST)","from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 7465559D;\n\tThu, 30 Jun 2022 02:03:15 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1656547398;\n\tbh=ABFPzWVJbl9jaOXCsm5Zt1bWOe+vVbWdzqIPZtNqzAc=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=mTiyI9fMzsmVnTMEwafL1gyIAM1bOG2UV/sX81NDoh7MEuUxrV4iu+pMxwVSA+kV+\n\tM/1q2lHWto55F8x0gC0Ebzf5ni/+1fKi7t1eTfRiz2K3AG0GciGkKsdYLB4qz5DAzQ\n\t5ewYjkmHp4hHTtAKZtB2nTydLkCXCWJKdkCCIlmXvg5d3ScN8XxRoc+gVg6hjUWu/N\n\ttFLJuEKv3R0PI8rzq+XyHkIO5sCOii09hiKMdkUsGvdLoDff5Gd8lpAtvEECRy3+wq\n\tbOxP4ZFK86NuIPHKw1ETlUK09Ku6zeqE/4VLFawLmxA71rKt9nW/ih8TciOjr6HU8Q\n\ts9hAVulJRqjHw==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1656547395;\n\tbh=ABFPzWVJbl9jaOXCsm5Zt1bWOe+vVbWdzqIPZtNqzAc=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=I4wCfAR1CXP/F+V1zCytwRrjwEx3YKyAq48OpsErxPaHAiGZOPbJmNbFYA1h2EI00\n\tPRm1dk/3fMwDDhhLfl9i7HstuRPddif0vyzhfvnoIjN5ugGxgyJXtHuYW6iXShxPw4\n\tB0FS3LUnaoARKLbR4Y7daMr3QgDI429byIhBfZk0="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"I4wCfAR1\"; dkim-atps=neutral","To":"libcamera-devel@lists.libcamera.org","Date":"Thu, 30 Jun 2022 03:02:41 +0300","Message-Id":"<20220630000251.31295-3-laurent.pinchart@ideasonboard.com>","X-Mailer":"git-send-email 2.35.1","In-Reply-To":"<20220630000251.31295-1-laurent.pinchart@ideasonboard.com>","References":"<20220630000251.31295-1-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v2 02/12] gstreamer: Move variable to loop\n\tscope","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"Nicolas Dufresne <nicolas.dufresne@collabora.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"The GstBuffer variable in GstLibcameraSrcState::requestCompleted() is\nonly used within the loop scope. Make it a local loop variable.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nReviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>\nReviewed-by: Umang Jain <umang.jain@ideasonboard.com>\n---\n src/gstreamer/gstlibcamerasrc.cpp | 3 +--\n 1 file changed, 1 insertion(+), 2 deletions(-)","diff":"diff --git a/src/gstreamer/gstlibcamerasrc.cpp b/src/gstreamer/gstlibcamerasrc.cpp\nindex 9d6be075a474..dea143961d69 100644\n--- a/src/gstreamer/gstlibcamerasrc.cpp\n+++ b/src/gstreamer/gstlibcamerasrc.cpp\n@@ -165,10 +165,9 @@ GstLibcameraSrcState::requestCompleted(Request *request)\n \t\treturn;\n \t}\n \n-\tGstBuffer *buffer;\n \tfor (GstPad *srcpad : srcpads_) {\n \t\tStream *stream = gst_libcamera_pad_get_stream(srcpad);\n-\t\tbuffer = wrap->detachBuffer(stream);\n+\t\tGstBuffer *buffer = wrap->detachBuffer(stream);\n \n \t\tFrameBuffer *fb = gst_libcamera_buffer_get_frame_buffer(buffer);\n \n","prefixes":["libcamera-devel","v2","02/12"]}