summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-02-08 23:58:29 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-02-13 13:23:37 +0200
commitdc642f6d0bfee3052b1f0b8201627f19ff205017 (patch)
tree4f9df755241d5534344aa66ad1e430f13776fab2
parent0c0b1e4dbe2b436a60c26cbaa68556988bcbf005 (diff)
libcamera: pipeline_handler: Disconnect MediaDevice::disconnected signal
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@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
-rw-r--r--src/libcamera/pipeline_handler.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libcamera/pipeline_handler.cpp b/src/libcamera/pipeline_handler.cpp
index 4e111d6d..616838fe 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;