[libcamera-devel] [PATCH 2/3] libcamera: pipeline: rkisp1: Assert empty queuedRequests before clearing frameInfo
Nícolas F. R. A. Prado
nfraprado at collabora.com
Tue Apr 6 20:23:34 CEST 2021
Assert that there are no queued requests before clearing the frameInfo,
otherwise a SEGFAULT can occur.
This issue happened while running lc-compliance.
Suggested-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
Signed-off-by: Nícolas F. R. A. Prado <nfraprado at collabora.com>
---
src/libcamera/pipeline/rkisp1/rkisp1.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
index c122c9be2afd..3c8d9dfe6f87 100644
--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
@@ -842,6 +842,7 @@ void PipelineHandlerRkISP1::stop(Camera *camera)
LOG(RkISP1, Warning)
<< "Failed to stop parameters for " << camera->id();
+ ASSERT(data->queuedRequests_.empty());
data->frameInfo_.clear();
freeBuffers(camera);
--
2.31.1
More information about the libcamera-devel
mailing list