spa: libcamera: source: propagate error when setting format

If `spa_libcamera_set_format()` fails, propagate its return value
as is without rewriting it to `EINVAL`.

(cherry picked from commit 14e0a8f66f)
This commit is contained in:
Barnabás Pőcze 2025-08-08 10:38:25 +02:00 committed by Robert Mader
parent ef09f436b3
commit 93426bca4b

View file

@ -1881,8 +1881,9 @@ int port_set_format(struct impl *impl, struct port *port,
port->current_format.reset(); port->current_format.reset();
} }
if (spa_libcamera_set_format(impl, port, &info, flags & SPA_NODE_PARAM_FLAG_TEST_ONLY) < 0) res = spa_libcamera_set_format(impl, port, &info, flags & SPA_NODE_PARAM_FLAG_TEST_ONLY);
return -EINVAL; if (res < 0)
return res;
if (!(flags & SPA_NODE_PARAM_FLAG_TEST_ONLY)) { if (!(flags & SPA_NODE_PARAM_FLAG_TEST_ONLY)) {
port->current_format = info; port->current_format = info;