From patchwork Tue Feb 12 22:37:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 561 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 786C160B21 for ; Tue, 12 Feb 2019 23:37:09 +0100 (CET) Received: from pendragon.bb.dnainternet.fi (dfj612yhrgyx302h3jwwy-3.rev.dnainternet.fi [IPv6:2001:14ba:21f5:5b00:ce28:277f:58d7:3ca4]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id EB56585 for ; Tue, 12 Feb 2019 23:37:08 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1550011029; bh=SlcslwDe9qmust3GNJIXAERP23Vo29Ja8Bw4muq/2yw=; h=From:To:Subject:Date:From; b=f1IY5svNm2eM4nzsK4nIyYbm7uUj6EfhvP5GCK3Sa6cID4YRmO+2FzcC82nutcEsF wKJUVFgVRkMIoL52eqTZO0mChXXx7dsKWH3u96nZGwoMHTwzDPIUI34FjnxmBLRs2C 53aMnCRYFNuHeqISKRdBN0Iw0egVeIHZnGb57WiU= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Wed, 13 Feb 2019 00:37:00 +0200 Message-Id: <20190212223702.9582-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.19.2 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 1/3] libcamera: pipeline_handler: Disconnect MediaDevice::disconnected signal X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Feb 2019 22:37:09 -0000 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 Reviewed-by: Niklas Söderlund --- 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;