From patchwork Wed Oct 21 15:41:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 10181 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 1E8AEBDB13 for ; Wed, 21 Oct 2020 15:41:58 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id B411960995; Wed, 21 Oct 2020 17:41:57 +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="m0Tc978Q"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id A796060BE5 for ; Wed, 21 Oct 2020 17:41:54 +0200 (CEST) Received: from Q.local (cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 414EEAEE; Wed, 21 Oct 2020 17:41:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1603294914; bh=p8OVJy2+spdtsu3tlRc3jASGz2jYQOq37XEfR3jGRg4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=m0Tc978QHGWQCZjGRT4on4J4TT9OkvMNL6MnWA0yt5oMbuHEpTiCv0NjqssRzP2lA enhvo2ktK4NG0PFsdsYk9Q/ohHmqkz+4OLxPbH4VNUXlCw0h67YvdfhRj6ASf9LnAk Vfsi7W+oI92w2KWiGGcQa98uVlTIvn7feruOZ680= From: Kieran Bingham To: libcamera devel Date: Wed, 21 Oct 2020 16:41:37 +0100 Message-Id: <20201021154148.511505-5-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201021154148.511505-1-kieran.bingham@ideasonboard.com> References: <20201021154148.511505-1-kieran.bingham@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v4 04/15] libcamera: pipeline: rpi_stream: Explicitly name requestBuffer 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 FrameBuffer used to track any addition to the request in an under-run event was shadowed against the returned buffer, being placed back on the availableBuffers_ queue. Rename the shadowed variable to be more explicit that it is a separate Buffer. Signed-off-by: Kieran Bingham Reviewed-by: Niklas Söderlund --- src/libcamera/pipeline/raspberrypi/rpi_stream.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp b/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp index 1a42cc17bcba..3a5dadab81e0 100644 --- a/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp +++ b/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp @@ -163,9 +163,9 @@ void Stream::returnBuffer(FrameBuffer *buffer) * If so, do it now as availableBuffers_ will not be empty. */ while (!requestBuffers_.empty()) { - FrameBuffer *buffer = requestBuffers_.front(); + FrameBuffer *requestBuffer = requestBuffers_.front(); - if (!buffer) { + if (!requestBuffer) { /* * We want to queue an internal buffer, but none * are available. Can't do anything, quit the loop. @@ -177,12 +177,12 @@ void Stream::returnBuffer(FrameBuffer *buffer) * We want to queue an internal buffer, and at least one * is available. */ - buffer = availableBuffers_.front(); + requestBuffer = availableBuffers_.front(); availableBuffers_.pop(); } requestBuffers_.pop(); - queueToDevice(buffer); + queueToDevice(requestBuffer); } }