summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-03-04 23:57:56 +0100
committerNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-03-06 17:45:48 +0100
commitbab5749227b38e62261c944480ed452833528464 (patch)
treeda30f75d056d85b683660a26cf78a99e0f20d826
parent353851b773a6f2a381e5b4e93598c44bbd42903a (diff)
libcamera: V4L2BufferCache: Use the entry reference
Instead of looking up the index in the storage vector use the reference to it created at the beginning of the loop. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-rw-r--r--src/libcamera/v4l2_videodevice.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp
index d88cb0bd..268de60b 100644
--- a/src/libcamera/v4l2_videodevice.cpp
+++ b/src/libcamera/v4l2_videodevice.cpp
@@ -216,7 +216,7 @@ int V4L2BufferCache::get(const FrameBuffer &buffer)
use = index;
/* Try to find a cache hit by comparing the planes. */
- if (cache_[index] == buffer) {
+ if (entry == buffer) {
hit = true;
use = index;
break;