[v1,8/9] v4l2: v4l2_camera: Clear completed requests when stopping
diff mbox series

Message ID 20261201083805.496809-9-barnabas.pocze@ideasonboard.com
State New
Headers show
Series
  • v4l2: request-buffer split preparation
Related show

Commit Message

Barnabás Pőcze Dec. 1, 2026, 8:38 a.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 c7f227ee09..32014ae19c 100644
--- a/src/v4l2/v4l2_camera.cpp
+++ b/src/v4l2/v4l2_camera.cpp
@@ -243,6 +243,7 @@  int V4L2Camera::streamOff()
 	{
 		MutexLocker locker(bufferMutex_);
 		isRunning_ = false;
+		completedBuffers_.clear();
 	}
 	bufferCV_.notify_all();