mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-17 09:25:07 +03:00
libcamera: framebuffer: Prevent modifying the number of metadata planes
The number of metadata planes should always match the number of frame buffer planes. Enforce this by making the vector private and providing accessor functions. As this changes the public API, update all in-tree users accordingly. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com> Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
This commit is contained in:
parent
9df775c757
commit
32635054bc
10 changed files with 34 additions and 20 deletions
|
@ -211,7 +211,7 @@ void V4L2CameraProxy::updateBuffers()
|
|||
|
||||
switch (fmd.status) {
|
||||
case FrameMetadata::FrameSuccess:
|
||||
buf.bytesused = fmd.planes[0].bytesused;
|
||||
buf.bytesused = fmd.planes()[0].bytesused;
|
||||
buf.field = V4L2_FIELD_NONE;
|
||||
buf.timestamp.tv_sec = fmd.timestamp / 1000000000;
|
||||
buf.timestamp.tv_usec = fmd.timestamp % 1000000;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue