[libcamera-devel] [PATCH v4 13/15] qcam: main_window: Explicitly name raw buffer
Kieran Bingham
kieran.bingham at ideasonboard.com
Wed Oct 21 17:41:46 CEST 2020
The buffer obtained for queuing to a raw stream shadows the buffer
passed in for the main view finder stream.
Prevent shadowing, and explicitly name the buffer as a separate variable.
Suggested-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>
Signed-off-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
---
src/qcam/main_window.cpp | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/qcam/main_window.cpp b/src/qcam/main_window.cpp
index 0cbdab9a6bce..f140313ede8d 100644
--- a/src/qcam/main_window.cpp
+++ b/src/qcam/main_window.cpp
@@ -769,16 +769,16 @@ void MainWindow::queueRequest(FrameBuffer *buffer)
request->addBuffer(vfStream_, buffer);
if (captureRaw_) {
- FrameBuffer *buffer = nullptr;
+ FrameBuffer *rawBuffer = nullptr;
{
QMutexLocker locker(&mutex_);
if (!freeBuffers_[rawStream_].isEmpty())
- buffer = freeBuffers_[rawStream_].dequeue();
+ rawBuffer = freeBuffers_[rawStream_].dequeue();
}
- if (buffer) {
- request->addBuffer(rawStream_, buffer);
+ if (rawBuffer) {
+ request->addBuffer(rawStream_, rawBuffer);
captureRaw_ = false;
} else {
qWarning() << "No free buffer available for RAW capture";
--
2.25.1
More information about the libcamera-devel
mailing list