client-stream: prefer client buffer params

This commit is contained in:
Wim Taymans 2018-06-26 16:54:48 +02:00
parent a13b5cfdc3
commit b46a0bc047

View file

@ -454,19 +454,6 @@ static int negotiate_buffers(struct impl *impl)
if (impl->n_buffers > 0) if (impl->n_buffers > 0)
return 0; return 0;
state = 0;
if ((res = spa_node_port_enum_params(impl->cnode,
impl->direction, 0,
t->param.idBuffers, &state,
param, &param, &b)) < 0) {
debug_params(impl, impl->cnode, impl->direction, 0,
t->param.idBuffers, param);
return res;
}
if (res == 0)
param = NULL;
state = 0; state = 0;
if ((res = spa_node_port_enum_params(impl->adapter, if ((res = spa_node_port_enum_params(impl->adapter,
SPA_DIRECTION_REVERSE(impl->direction), 0, SPA_DIRECTION_REVERSE(impl->direction), 0,
@ -476,6 +463,18 @@ static int negotiate_buffers(struct impl *impl)
t->param.idBuffers, param); t->param.idBuffers, param);
return -ENOTSUP; return -ENOTSUP;
} }
if (res == 0)
param = NULL;
state = 0;
if ((res = spa_node_port_enum_params(impl->cnode,
impl->direction, 0,
t->param.idBuffers, &state,
param, &param, &b)) < 0) {
debug_params(impl, impl->cnode, impl->direction, 0,
t->param.idBuffers, param);
return res;
}
spa_pod_fixate(param); spa_pod_fixate(param);