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 31176120f5)
This commit is contained in:
Barnabás Pőcze 2025-08-11 17:44:48 +02:00 committed by Robert Mader
parent e7eef5f7ec
commit a6ec4521f7

View file

@ -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);