mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
spa: libcamera: don't calculate id twice
This commit is contained in:
parent
bb1c2c3272
commit
9eab76d862
1 changed files with 2 additions and 2 deletions
|
|
@ -112,9 +112,9 @@ static struct device *add_device(struct impl *impl, std::shared_ptr<Camera> came
|
||||||
|
|
||||||
if (impl->n_devices >= MAX_DEVICES)
|
if (impl->n_devices >= MAX_DEVICES)
|
||||||
return NULL;
|
return NULL;
|
||||||
id = get_free_id(impl);;
|
id = get_free_id(impl);
|
||||||
device = &impl->devices[id];
|
device = &impl->devices[id];
|
||||||
device->id = get_free_id(impl);;
|
device->id = id;
|
||||||
device->camera = std::move(camera);
|
device->camera = std::move(camera);
|
||||||
impl->n_devices++;
|
impl->n_devices++;
|
||||||
return device;
|
return device;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue