v4l2: v4l2_camera_proxy: Fix timestamp calculation
The V4L2 Compatibility layer is returning timestamps for buffers which
are incorrectly calculated from the frame metadata.
The sec component of the timestamp is correct, but the usec component is
out, leaving frame captures reporting non-monotonically increasing
timestamps, and incorrect frame rate calculations.
Fix the usecs calculation reported by the V4L2 adaptation layer.
Bug: https://bugs.libcamera.org/show_bug.cgi?id=118
Fixes: 0ce8f2390b
("v4l2: v4l2_compat: Add V4L2 compatibility layer")
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
1966b9a584
commit
039a6a02d0
1 changed files with 1 additions and 1 deletions
|
@ -231,7 +231,7 @@ void V4L2CameraProxy::updateBuffers()
|
|||
});
|
||||
buf.field = V4L2_FIELD_NONE;
|
||||
buf.timestamp.tv_sec = fmd.timestamp / 1000000000;
|
||||
buf.timestamp.tv_usec = fmd.timestamp % 1000000;
|
||||
buf.timestamp.tv_usec = (fmd.timestamp / 1000) % 1000000;
|
||||
buf.sequence = fmd.sequence;
|
||||
|
||||
buf.flags |= V4L2_BUF_FLAG_DONE;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue