pipewire/spa/plugins
Javier Martinez Canillas 21c412dc49
libcamera: fix a use-after-free due an attempt to stop the camera twice
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
2021-09-21 14:49:08 +02:00
..
alsa alsa: enumerate all passthrough formats 2021-09-21 13:02:48 +02:00
audioconvert audioconvert: increase buffer size 2021-09-20 20:11:50 +02:00
audiomixer spa: handle last_port correctly 2021-09-14 21:06:21 +02:00
audiotestsrc audiotestsrc: convert sizes to const size_t 2021-07-05 23:30:45 +03:00
bluez5 spa/bluez: correct a library name variable in meson.build 2021-09-20 07:29:03 +00:00
control spa: fix the indentation in the various meson.build files 2021-09-20 07:29:03 +00:00
ffmpeg spa: fix the indentation in the various meson.build files 2021-09-20 07:29:03 +00:00
jack spa: fix the indentation in the various meson.build files 2021-09-20 07:29:03 +00:00
libcamera libcamera: fix a use-after-free due an attempt to stop the camera twice 2021-09-21 14:49:08 +02:00
support test: implement a test for the journal logger 2021-09-20 07:29:03 +00:00
test spa: fix the indentation in the various meson.build files 2021-09-20 07:29:03 +00:00
v4l2 spa: fix the indentation in the various meson.build files 2021-09-20 07:29:03 +00:00
videoconvert spa: fix the indentation in the various meson.build files 2021-09-20 07:29:03 +00:00
videotestsrc spa: fix the indentation in the various meson.build files 2021-09-20 07:29:03 +00:00
volume spa: fix the indentation in the various meson.build files 2021-09-20 07:29:03 +00:00
vulkan spa: fix the indentation in the various meson.build files 2021-09-20 07:29:03 +00:00
meson.build meson.build: adds V4L2 header and enablement reporting via summary() 2021-06-25 15:13:07 +03:00