From b46a0bc0475c46e1857459b4d0ca1dcb5b030a86 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 26 Jun 2018 16:54:48 +0200 Subject: [PATCH] client-stream: prefer client buffer params --- .../module-client-node/client-stream.c | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/src/modules/module-client-node/client-stream.c b/src/modules/module-client-node/client-stream.c index 3c1595d34..fdd90cf82 100644 --- a/src/modules/module-client-node/client-stream.c +++ b/src/modules/module-client-node/client-stream.c @@ -454,19 +454,6 @@ static int negotiate_buffers(struct impl *impl) if (impl->n_buffers > 0) return 0; - state = 0; - if ((res = spa_node_port_enum_params(impl->cnode, - impl->direction, 0, - t->param.idBuffers, &state, - param, ¶m, &b)) < 0) { - debug_params(impl, impl->cnode, impl->direction, 0, - t->param.idBuffers, param); - return res; - } - - if (res == 0) - param = NULL; - state = 0; if ((res = spa_node_port_enum_params(impl->adapter, SPA_DIRECTION_REVERSE(impl->direction), 0, @@ -476,6 +463,18 @@ static int negotiate_buffers(struct impl *impl) t->param.idBuffers, param); 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, ¶m, &b)) < 0) { + debug_params(impl, impl->cnode, impl->direction, 0, + t->param.idBuffers, param); + return res; + } spa_pod_fixate(param);