[libcamera-devel] [PATCH 1/3] libcamera: pipeline_handler: Disconnect MediaDevice::disconnected signal
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Tue Feb 12 23:37:00 CET 2019
The pipeline handler connects the disconnected signal of MediaDevice
instances registered for hotplug handling to a member slot. Disconnect
the signal when the slot is called, as the pipeline handler will be
deleted.
Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
---
src/libcamera/pipeline_handler.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/libcamera/pipeline_handler.cpp b/src/libcamera/pipeline_handler.cpp
index 4e111d6d2f55..616838fed702 100644
--- a/src/libcamera/pipeline_handler.cpp
+++ b/src/libcamera/pipeline_handler.cpp
@@ -241,6 +241,8 @@ void PipelineHandler::hotplugMediaDevice(MediaDevice *media)
*/
void PipelineHandler::mediaDeviceDisconnected(MediaDevice *media)
{
+ media->disconnected.disconnect(this);
+
if (cameras_.empty())
return;
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list