diff options
author | Niklas Söderlund <niklas.soderlund@ragnatech.se> | 2019-11-22 00:04:03 +0100 |
---|---|---|
committer | Niklas Söderlund <niklas.soderlund@ragnatech.se> | 2020-01-12 16:10:37 +0100 |
commit | 3f9d34f55e031c663d807258dfa156b95b995d55 (patch) | |
tree | 14ff62937095fb605b62b44660ce887cc6648685 | |
parent | fca110915525be2105f5495f5f80943261be6757 (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>
-rw-r--r-- | src/libcamera/v4l2_videodevice.cpp | 2 |
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; |