summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libcamera/pipeline/simple/simple.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp
index 13c0a189..b425bc0d 100644
--- a/src/libcamera/pipeline/simple/simple.cpp
+++ b/src/libcamera/pipeline/simple/simple.cpp
@@ -226,6 +226,7 @@ public:
V4L2Subdevice::Whence whence,
Transform transform = Transform::Identity);
void bufferReady(FrameBuffer *buffer);
+ void clearIncompleteRequests();
unsigned int streamIndex(const Stream *stream) const
{
@@ -876,6 +877,14 @@ void SimpleCameraData::bufferReady(FrameBuffer *buffer)
pipe->completeRequest(request);
}
+void SimpleCameraData::clearIncompleteRequests()
+{
+ while (!conversionQueue_.empty()) {
+ pipe()->cancelRequest(conversionQueue_.front().request);
+ conversionQueue_.pop();
+ }
+}
+
void SimpleCameraData::conversionInputDone(FrameBuffer *buffer)
{
/* Queue the input buffer back for capture. */
@@ -1401,6 +1410,7 @@ void SimplePipelineHandler::stopDevice(Camera *camera)
video->bufferReady.disconnect(data, &SimpleCameraData::bufferReady);
+ data->clearIncompleteRequests();
data->conversionBuffers_.clear();
releasePipeline(data);