spa: libcamera: don't calculate id twice

This commit is contained in:
Barnabás Pőcze 2024-03-08 22:48:10 +01:00 committed by Wim Taymans
parent bb1c2c3272
commit 9eab76d862

View file

@ -112,9 +112,9 @@ static struct device *add_device(struct impl *impl, std::shared_ptr<Camera> came
if (impl->n_devices >= MAX_DEVICES)
return NULL;
id = get_free_id(impl);;
id = get_free_id(impl);
device = &impl->devices[id];
device->id = get_free_id(impl);;
device->id = id;
device->camera = std::move(camera);
impl->n_devices++;
return device;