From a6ec4521f77cc0c6e4da0da05a7257093ae87b45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20P=C5=91cze?= Date: Mon, 11 Aug 2025 17:44:48 +0200 Subject: [PATCH] spa: libcamera: source: handle try-only format unset Do nothing if `format == nullptr` and `SPA_NODE_PARAM_FLAG_TEST_ONLY` is present. (cherry picked from commit 31176120f512349eb59585b0b4f368b07149a05c) --- spa/plugins/libcamera/libcamera-source.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spa/plugins/libcamera/libcamera-source.cpp b/spa/plugins/libcamera/libcamera-source.cpp index 422df89b5..cf73cfd46 100644 --- a/spa/plugins/libcamera/libcamera-source.cpp +++ b/spa/plugins/libcamera/libcamera-source.cpp @@ -1837,7 +1837,7 @@ int port_set_format(struct impl *impl, struct port *port, const bool try_only = SPA_FLAG_IS_SET(flags, SPA_NODE_PARAM_FLAG_TEST_ONLY); if (format == nullptr) { - if (!port->current_format) + if (try_only || !port->current_format) return 0; spa_libcamera_stream_off(impl);