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();
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(+)