summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libcamera/camera.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp
index 8e17085b..b4197f95 100644
--- a/src/libcamera/camera.cpp
+++ b/src/libcamera/camera.cpp
@@ -488,8 +488,12 @@ int Camera::freeBuffers()
if (!stream->bufferPool().count())
continue;
- pipe_->freeBuffers(this, stream);
+ /*
+ * All mappings must be destroyed before buffers can be freed
+ * by the V4L2 device that has allocated them.
+ */
stream->bufferPool().destroyBuffers();
+ pipe_->freeBuffers(this, stream);
}
state_ = CameraConfigured;