From 8c30369119f40c780caa6b8c05e25bafafed90d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20P=C5=91cze?= Date: Wed, 13 Aug 2025 16:40:20 +0200 Subject: [PATCH] libcamera: software_isp: Clear pending async work MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Debayering is carried out on `ispWorkerThread_`. When stopping, the queued work needs to be flushed or cancelled to ensure that the next time it starts, it won't process stale data. So remove all messages targeting the `Debayer` object on the worker thread. Signed-off-by: Barnabás Pőcze Reviewed-by: Kieran Bingham Tested-by: Robert Mader --- src/libcamera/software_isp/software_isp.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libcamera/software_isp/software_isp.cpp b/src/libcamera/software_isp/software_isp.cpp index b7651b7d..fdadf79e 100644 --- a/src/libcamera/software_isp/software_isp.cpp +++ b/src/libcamera/software_isp/software_isp.cpp @@ -358,6 +358,7 @@ void SoftwareIsp::stop() { ispWorkerThread_.exit(); ispWorkerThread_.wait(); + ispWorkerThread_.removeMessages(debayer_.get()); Thread::current()->dispatchMessages(Message::Type::InvokeMessage, this);