[{"id":23620,"web_url":"https://patchwork.libcamera.org/comment/23620/","msgid":"<42139ab723d6578bb972c2ba3c5a6166628843b5.camel@collabora.com>","date":"2022-06-27T20:45:50","subject":"Re: [libcamera-devel] [PATCH 03/13] gstreamer: Move variable to\n\tloop scope","submitter":{"id":31,"url":"https://patchwork.libcamera.org/api/people/31/","name":"Nicolas Dufresne","email":"nicolas.dufresne@collabora.com"},"content":"Hi Laurent,\n\nLe vendredi 24 juin 2022 à 02:22 +0300, Laurent Pinchart a écrit :\n> The GstBuffer variable in GstLibcameraSrcState::requestCompleted() is\n> only used within the loop scope. Make it a local loop variable.\n> \n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nThanks for the cleanup.\n\nReviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>\n\n> ---\n>  src/gstreamer/gstlibcamerasrc.cpp | 3 +--\n>  1 file changed, 1 insertion(+), 2 deletions(-)\n> \n> diff --git a/src/gstreamer/gstlibcamerasrc.cpp b/src/gstreamer/gstlibcamerasrc.cpp\n> index 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>","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 5BF39BE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 27 Jun 2022 20:46:02 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1A65D65635;\n\tMon, 27 Jun 2022 22:46:02 +0200 (CEST)","from madras.collabora.co.uk (madras.collabora.co.uk\n\t[IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 221FD6059B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 27 Jun 2022 22:46:00 +0200 (CEST)","from nicolas-tpx395.localdomain (192-222-136-102.qc.cable.ebox.net\n\t[192.222.136.102])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\tkey-exchange X25519 server-signature RSA-PSS (4096 bits)\n\tserver-digest SHA256)\n\t(No client certificate requested) (Authenticated sender: nicolas)\n\tby madras.collabora.co.uk (Postfix) with ESMTPSA id 67DA066015C8;\n\tMon, 27 Jun 2022 21:45:59 +0100 (BST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1656362762;\n\tbh=M9MXHHT6tLS8nXAs7eZk0+1PFE+FyME3/uSeiPHp7Kw=;\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=miLZyrvsOocxHjsZbmWBXO6fu6JL3o7xpjUF6FTTB1FHyijbUGra1BXE3gcRXzkmW\n\tj0ZLrYwTVJVPBoSUowNI2yHTnBaNg5sbHxu1fH72aA4X4qRZbwUYYWqW9c+FxeHM0O\n\tT+tWMyghWNy3nkneRXq0nfMnMtIO5lrF0/41K4swapfpSIHiPuI2jdBng/yV3nb8g6\n\t+ME6Y4WT1rkrZYykcp90PGxEgn3l+fNco6HSNnCyn2YvVc10bBQ5KdzDCvcGpfNi3i\n\t82Oir+th/ndh3GHqmViCHRz9Pe7zdd08C8USsmzNBafdQf0/GFtmh40yBrKEJBWE9v\n\tVq3NTuwQvA5+w==","v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com;\n\ts=mail; t=1656362759;\n\tbh=M9MXHHT6tLS8nXAs7eZk0+1PFE+FyME3/uSeiPHp7Kw=;\n\th=Subject:From:To:Cc:Date:In-Reply-To:References:From;\n\tb=HXmFWQBxlROhnEiTqpddxyzTr+6OwxRNJEl2sR/OZckprml8nFnJHw1UztJG2UDr9\n\tpHgtPcqya1iwNcEwYgrPqUuhLspSVxCqIEXbvhOvXoVZpKrb7HbzIEhApm/TGvlZGt\n\ttpm25aQoGEtcJh0hnCGL0AtmYKE5tFSEzkPoU6Zr5Umarx1AQy/mUO0pnBrhhT6xvr\n\tQpYJIMcEOUNS+6IJtztCGjQeVx/L4K6ukcgpdPozi48kTpDPSpii3IqQorbDqtsagw\n\tZfMwH5MCQONELjQrLnZrSJH6ueIaPpfZ1wb3+TYn4iT1GrWveqOT4Ac2jENpePdI5b\n\tIwOqzD9ho+U3Q=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=collabora.com\n\theader.i=@collabora.com\n\theader.b=\"HXmFWQBx\"; dkim-atps=neutral","Message-ID":"<42139ab723d6578bb972c2ba3c5a6166628843b5.camel@collabora.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>, \n\tlibcamera-devel@lists.libcamera.org","Date":"Mon, 27 Jun 2022 16:45:50 -0400","In-Reply-To":"<20220623232210.18742-4-laurent.pinchart@ideasonboard.com>","References":"<20220623232210.18742-1-laurent.pinchart@ideasonboard.com>\n\t<20220623232210.18742-4-laurent.pinchart@ideasonboard.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Content-Transfer-Encoding":"quoted-printable","User-Agent":"Evolution 3.44.2 (3.44.2-1.fc36) ","MIME-Version":"1.0","Subject":"Re: [libcamera-devel] [PATCH 03/13] gstreamer: Move variable to\n\tloop scope","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":"Nicolas Dufresne via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Nicolas Dufresne <nicolas.dufresne@collabora.com>","Cc":"Vedant Paranjape <vedantparanjape160201@gmail.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":23658,"web_url":"https://patchwork.libcamera.org/comment/23658/","msgid":"<cd1206ad-fbdd-71d2-78b0-097bd2ccfc22@ideasonboard.com>","date":"2022-06-29T11:23:23","subject":"Re: [libcamera-devel] [PATCH 03/13] gstreamer: Move variable to\n\tloop scope","submitter":{"id":86,"url":"https://patchwork.libcamera.org/api/people/86/","name":"Umang Jain","email":"umang.jain@ideasonboard.com"},"content":"Hi Laurent,\n\nThank you for the patch.\n\nOn 6/24/22 04:52, Laurent Pinchart via libcamera-devel wrote:\n> The GstBuffer variable in GstLibcameraSrcState::requestCompleted() is\n> only used within the loop scope. Make it a local loop variable.\n>\n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n\nReviewed-by: Umang Jain <umang.jain@ideasonboard.com>\n\n> ---\n>   src/gstreamer/gstlibcamerasrc.cpp | 3 +--\n>   1 file changed, 1 insertion(+), 2 deletions(-)\n>\n> diff --git a/src/gstreamer/gstlibcamerasrc.cpp b/src/gstreamer/gstlibcamerasrc.cpp\n> index 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>","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 E2E55BD808\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 29 Jun 2022 11:23:32 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 60E4565635;\n\tWed, 29 Jun 2022 13:23:32 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2BA8660412\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 29 Jun 2022 13:23:31 +0200 (CEST)","from [IPV6:2401:4900:1f3f:ca21:e286:106b:5da4:9482] (unknown\n\t[IPv6:2401:4900:1f3f:ca21:e286:106b:5da4:9482])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 87FD53D7;\n\tWed, 29 Jun 2022 13:23:28 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1656501812;\n\tbh=uHG/vCcZmB8c8ofVVE93W4Dx8ixtI0Vr+LKQfhMonvc=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=33gcsZqL3bG4SCGJovt3nWvXlMiwSwod+hXpVgmB+nMta4x1eqn/LyqscczW4Agq5\n\tvv5Zv9ksnffJJf/nW10igqUCtszFZUQdPsZU0JPY0IYF0mHdAcKFzIIGaf3/HLam6b\n\tDZVIgbWAdNBZCxq2dCCq4VTT/RuO7PAwdL5wJ3n+qfG1ASzIW4Xg029v6CxCl/LLKR\n\tpwDAbKRXA/30hwvemNAWWe7RXZ1uCFIEzrGrrZTzFIWInbx5InFFxiX23NOrdFuq2T\n\t8KY4/xMeOMrbBd6023xGoKHpbRLKNErR3c12KR6iYKxTyq5lJXrLpapnDFpAoZmt4L\n\tc23bGJKIEC7LQ==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1656501810;\n\tbh=uHG/vCcZmB8c8ofVVE93W4Dx8ixtI0Vr+LKQfhMonvc=;\n\th=Date:Subject:To:Cc:References:From:In-Reply-To:From;\n\tb=CHmd4TWmipiKejP6SJILULpd+yqlurWzzzvFo8ucwi0wDjEONMQNzzitUr6qSYBkG\n\twLnFfgT7w7W2Hx/UtbokWJb7ZrVYotNOWDquVvTRx117X+tP2b0fNTWBtQvfmL2HvV\n\ttuzy8vGJVJkn1RHPSeV9WWtfyV6/f3S1kmLjMSno="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"CHmd4TWm\"; dkim-atps=neutral","Message-ID":"<cd1206ad-fbdd-71d2-78b0-097bd2ccfc22@ideasonboard.com>","Date":"Wed, 29 Jun 2022 16:53:23 +0530","MIME-Version":"1.0","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101\n\tThunderbird/91.4.1","Content-Language":"en-US","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20220623232210.18742-1-laurent.pinchart@ideasonboard.com>\n\t<20220623232210.18742-4-laurent.pinchart@ideasonboard.com>","In-Reply-To":"<20220623232210.18742-4-laurent.pinchart@ideasonboard.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH 03/13] gstreamer: Move variable to\n\tloop scope","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":"Umang Jain via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Umang Jain <umang.jain@ideasonboard.com>","Cc":"Nicolas Dufresne <nicolas.dufresne@collabora.com>,\n\tVedant Paranjape <vedantparanjape160201@gmail.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]