summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/v4l2/v4l2_camera.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/v4l2/v4l2_camera.cpp b/src/v4l2/v4l2_camera.cpp
index f7df9b85..ffc1230e 100644
--- a/src/v4l2/v4l2_camera.cpp
+++ b/src/v4l2/v4l2_camera.cpp
@@ -147,6 +147,8 @@ int V4L2Camera::allocBuffers(unsigned int count)
void V4L2Camera::freeBuffers()
{
+ pendingRequests_.clear();
+
Stream *stream = *camera_->streams().begin();
bufferAllocator_->free(stream);
}
@@ -188,10 +190,11 @@ int V4L2Camera::streamOn()
int V4L2Camera::streamOff()
{
- /* \todo Restore buffers to reqbufs state? */
if (!isRunning_)
return 0;
+ pendingRequests_.clear();
+
int ret = camera_->stop();
if (ret < 0)
return ret == -EACCES ? -EBUSY : ret;