mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
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:
parent
417a72365e
commit
548fa0ec48
2 changed files with 12 additions and 4 deletions
|
|
@ -468,9 +468,13 @@ static int negotiate_buffers(struct impl *this)
|
|||
this->direction, 0,
|
||||
SPA_PARAM_Buffers, &state,
|
||||
param, ¶m, &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;
|
||||
|
|
|
|||
|
|
@ -470,9 +470,13 @@ static int negotiate_buffers(struct impl *this)
|
|||
this->direction, 0,
|
||||
SPA_PARAM_Buffers, &state,
|
||||
param, ¶m, &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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue