mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
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:
parent
ef09f436b3
commit
93426bca4b
1 changed files with 3 additions and 2 deletions
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue