spa: libcamera: source: handle camera acquire failure

Check the return value of `Camera::acquire()` and return the error
if that fails.
This commit is contained in:
Barnabás Pőcze 2025-07-12 18:24:44 +02:00 committed by Wim Taymans
parent 1a1cf55efb
commit f53ac8d57c

View file

@ -211,7 +211,9 @@ int spa_libcamera_open(struct impl *impl)
return 0;
spa_log_info(impl->log, "open camera %s", impl->device_id.c_str());
impl->camera->acquire();
if (int res = impl->camera->acquire(); res < 0)
return res;
impl->allocator = new FrameBufferAllocator(impl->camera);