mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
Previously, in `remove_device()`, the last device would be copied into the slot of the to-be-remove device. The problem with this is that it left the shared_ptr untouched in the previously last slot, and hence creating an extra reference. Fix this by moving instead of copying. A similar problem is present in `clear_devices()` which also did not properly dispose of the shared_ptrs. Fix that by calling `reset()` on each device's camera pointer. |
||
|---|---|---|
| .. | ||
| libcamera-client.c | ||
| libcamera-device.cpp | ||
| libcamera-manager.cpp | ||
| libcamera-manager.hpp | ||
| libcamera-source.cpp | ||
| libcamera-utils.cpp | ||
| libcamera.c | ||
| libcamera.h | ||
| meson.build | ||