summaryrefslogtreecommitdiff
path: root/src/libcamera/v4l2_videodevice.cpp
diff options
context:
space:
mode:
authorNiklas Söderlund <niklas.soderlund@ragnatech.se>2019-11-22 00:04:03 +0100
committerNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-01-12 16:10:37 +0100
commit3f9d34f55e031c663d807258dfa156b95b995d55 (patch)
tree14ff62937095fb605b62b44660ce887cc6648685 /src/libcamera/v4l2_videodevice.cpp
parentfca110915525be2105f5495f5f80943261be6757 (diff)
libcamera: v4l2_videodevice: Align which type variable is used in queueBuffer()
Reading V4L2VideoDevice::queueBuffer() is confusing since buf.type is first set to bufferType_ but then both variables are used in V4L2 macros to operate based on which type of buffer is being processed. Align on only using buf.type since it has the most existing users. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/libcamera/v4l2_videodevice.cpp')
-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 1dc9e193..81d999e3 100644
--- a/src/libcamera/v4l2_videodevice.cpp
+++ b/src/libcamera/v4l2_videodevice.cpp
@@ -1004,7 +1004,7 @@ int V4L2VideoDevice::queueBuffer(Buffer *buffer)
buf.m.planes = v4l2Planes;
}
- if (V4L2_TYPE_IS_OUTPUT(bufferType_)) {
+ if (V4L2_TYPE_IS_OUTPUT(buf.type)) {
buf.bytesused = buffer->bytesused_;
buf.sequence = buffer->sequence_;
buf.timestamp.tv_sec = buffer->timestamp_ / 1000000000;