[v3] libcamera: Make FrameBuffer status default to FrameError
diff mbox series

Message ID 20240909091431.3688159-1-chenghaoyang@google.com
State New
Headers show
Series
  • [v3] libcamera: Make FrameBuffer status default to FrameError
Related show

Commit Message

Harvey Yang Sept. 9, 2024, 9:14 a.m. UTC
From: Han-Lin Chen <hanlinchen@chromium.org>

To make sure platforms follow V4L2 spec and frame buffers go through
V4L2VideoDevice, setting default values to FrameMetadata's member
variables. Especially, status is defaulted to be FrameError.

Signed-off-by: Han-Lin Chen <hanlinchen@chromium.org>
Co-developed-by: Harvey Yang <chenghaoyang@chromium.org>
---
 include/libcamera/framebuffer.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Patch
diff mbox series

diff --git a/include/libcamera/framebuffer.h b/include/libcamera/framebuffer.h
index ff839243..ececc123 100644
--- a/include/libcamera/framebuffer.h
+++ b/include/libcamera/framebuffer.h
@@ -32,9 +32,9 @@  struct FrameMetadata {
 		unsigned int bytesused;
 	};
 
-	Status status;
-	unsigned int sequence;
-	uint64_t timestamp;
+	Status status = FrameError;
+	unsigned int sequence = 0;
+	uint64_t timestamp = 0;
 
 	Span<Plane> planes() { return planes_; }
 	Span<const Plane> planes() const { return planes_; }