adapter:handle -ENOENT when enumerating buffers

When the follower has no buffer suggestion, it can return -ENOENT, which
should not generate an error but simply use the converter buffer
suggestion instead.
This commit is contained in:
Wim Taymans 2025-05-27 15:00:43 +02:00
parent 417a72365e
commit 548fa0ec48
2 changed files with 12 additions and 4 deletions

View file

@ -470,9 +470,13 @@ static int negotiate_buffers(struct impl *this)
this->direction, 0,
SPA_PARAM_Buffers, &state,
param, &param, &b)) != 1) {
debug_params(this, this->follower, this->direction, 0,
if (res == -ENOENT)
res = 0;
else {
debug_params(this, this->follower, this->direction, 0,
SPA_PARAM_Buffers, param, "follower buffers", res);
return -ENOTSUP;
return res < 0 ? res : -ENOTSUP;
}
}
if (param == NULL)
return -ENOTSUP;