[RFC,v1,15/54] v4l2: v4l2_camera: Clear completed requests when stopping
diff mbox series

Message ID 20260629163017.863145-16-barnabas.pocze@ideasonboard.com
State New
Headers show
Series
  • libcamera: Split requests and buffers
Related show

Commit Message

Barnabás Pőcze June 29, 2026, 4:29 p.m. UTC
The queue `completedBuffers_` keeps track of the completed buffers
for servicing `VIDIOC_DQBUF` calls. It should be cleared when the
streaming is stopped otherwise after the next startup stale data
might be used.

Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
---
 src/v4l2/v4l2_camera.cpp | 1 +
 1 file changed, 1 insertion(+)

Patch
diff mbox series

diff --git a/src/v4l2/v4l2_camera.cpp b/src/v4l2/v4l2_camera.cpp
index 8c7de8e92b..99109e93af 100644
--- a/src/v4l2/v4l2_camera.cpp
+++ b/src/v4l2/v4l2_camera.cpp
@@ -242,6 +242,7 @@  int V4L2Camera::streamOff()
 	{
 		MutexLocker locker(bufferMutex_);
 		isRunning_ = false;
+		completedBuffers_.clear();
 	}
 	bufferCV_.notify_all();