Message ID | 20190212223702.9582-1-laurent.pinchart@ideasonboard.com |
---|---|
State | Accepted |
Headers | show |
Series |
|
Related | show |
Hi Laurent, Thanks for your patch. On 2019-02-13 00:37:00 +0200, Laurent Pinchart wrote: > 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> > --- > 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 > > _______________________________________________ > libcamera-devel mailing list > libcamera-devel@lists.libcamera.org > https://lists.libcamera.org/listinfo/libcamera-devel
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;
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> --- src/libcamera/pipeline_handler.cpp | 2 ++ 1 file changed, 2 insertions(+)