mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
Camera is currently stopped and started in the spa_libcamera_set_format()
function, but this leads to a segfault due attempting to access a buffers
field of an already freed libcamera::FrameBufferAllocator instance.
The FrameBufferAllocator instance is freed in LibCamera::stop(), that is
called by spa_libcamera_stream_off() as handler of the node commands
SPA_NODE_COMMAND_Pause and SPA_NODE_COMMAND_Suspend.
Since the camera was already stopped, there's no need to attempt to stop
it again. In fact, the camera shouldn't be stopped/started at all in the
spa_libcamera_set_format() function but instead only as an action of the
SPA_NODE_COMMAND_{Pause,Suspend} and SPA_NODE_COMMAND_Start commands.
And same for the stop that's done in the LibCamera::close() function, it
shouldn't be needed because the camera is already stopped before closing.
Fixes #1513
|
||
|---|---|---|
| .. | ||
| libcamera-client.c | ||
| libcamera-device.c | ||
| libcamera-source.c | ||
| libcamera-utils.c | ||
| libcamera.c | ||
| libcamera.h | ||
| libcamera_wrapper.cpp | ||
| libcamera_wrapper.h | ||
| meson.build | ||