diff --git a/spa/plugins/libcamera/libcamera-manager.cpp b/spa/plugins/libcamera/libcamera-manager.cpp index c8b38b78d..ed48c2cc2 100644 --- a/spa/plugins/libcamera/libcamera-manager.cpp +++ b/spa/plugins/libcamera/libcamera-manager.cpp @@ -29,7 +29,7 @@ #include #include #include - +#include #include #include @@ -127,7 +127,7 @@ static struct device *add_device(struct impl *impl, std::shared_ptr came id = impl->n_devices++; device = &impl->devices[id]; device->id = id; - device->camera = camera; + device->camera = std::move(camera); return device; } @@ -193,7 +193,7 @@ void Impl::addCamera(std::shared_ptr camera) if ((device = find_device(impl, camera.get())) != NULL) return; - if ((device = add_device(impl, camera)) == NULL) + if ((device = add_device(impl, std::move(camera))) == NULL) return; emit_object_info(impl, device);