summaryrefslogtreecommitdiff
path: root/src/qcam/main_window.cpp
diff options
context:
space:
mode:
authorKieran Bingham <kieran.bingham@ideasonboard.com>2020-07-28 13:21:01 +0100
committerKieran Bingham <kieran.bingham@ideasonboard.com>2020-10-21 17:18:48 +0100
commit2babedf2b32223b4c4a8f193140d60fa083c13c1 (patch)
tree61f74e23e9b91e0dbc86b270d00447efccfe17f7 /src/qcam/main_window.cpp
parent732ea045f506919a313bec5d7623b547967784fc (diff)
qcam: main_window: Explicitly name raw buffer
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@ragnatech.se> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/qcam/main_window.cpp')
-rw-r--r--src/qcam/main_window.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qcam/main_window.cpp b/src/qcam/main_window.cpp
index 0cbdab9a..f140313e 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";