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`.
This commit is contained in:
Barnabás Pőcze 2025-08-08 10:38:25 +02:00
parent 47ee86938b
commit 14e0a8f66f

View file

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