summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWim Taymans <wtaymans@redhat.com>2019-07-11 11:20:04 +0200
committerWim Taymans <wtaymans@redhat.com>2019-07-11 11:20:04 +0200
commit6f672c883ec9ca5c2cee50615f17216182a7e1e8 (patch)
treedbfc1427516d35cbce215a2e565617d8dbc404e3 /src
parenta6ce5e7eeb03a1b64660030ae61bc40a93a10af0 (diff)
node: always call output mix when HAVE_BUFFER
Diffstat (limited to 'src')
-rw-r--r--src/pipewire/node.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/pipewire/node.c b/src/pipewire/node.c
index a3ff885e..23f62bcb 100644
--- a/src/pipewire/node.c
+++ b/src/pipewire/node.c
@@ -675,18 +675,12 @@ static void dump_states(struct pw_node *driver)
static inline int resume_node(struct pw_node *this, int status)
{
- struct pw_port *p;
struct pw_node_target *t;
struct timespec ts;
struct pw_node_activation *activation = this->rt.activation;
struct spa_system *data_system = this->core->data_system;
uint64_t nsec;
- if (status & SPA_STATUS_HAVE_BUFFER) {
- spa_list_for_each(p, &this->rt.output_mix, rt.node_link)
- spa_node_process(p->mix);
- }
-
spa_system_clock_gettime(data_system, CLOCK_MONOTONIC, &ts);
nsec = SPA_TIMESPEC_TO_NSEC(&ts);
activation->status = FINISHED;
@@ -732,6 +726,11 @@ static inline int process_node(void *data)
status = spa_node_process(this->node);
a->state[0].status = status;
+ if (status & SPA_STATUS_HAVE_BUFFER) {
+ spa_list_for_each(p, &this->rt.output_mix, rt.node_link)
+ spa_node_process(p->mix);
+ }
+
if (this == this->driver_node && !this->exported) {
spa_system_clock_gettime(data_system, CLOCK_MONOTONIC, &ts);
a->status = FINISHED;
@@ -1060,6 +1059,7 @@ static int node_ready(void *data, int status)
struct pw_node *node = data;
struct pw_node *driver = node->driver_node;
struct pw_node_target *t;
+ struct pw_port *p;
pw_log_trace_fp("node %p: ready driver:%d exported:%d %p status:%d", node,
node->driver, node->exported, driver, status);
@@ -1079,6 +1079,11 @@ static int node_ready(void *data, int status)
if (node->driver && !node->master)
return 0;
+ if (status & SPA_STATUS_HAVE_BUFFER) {
+ spa_list_for_each(p, &node->rt.output_mix, rt.node_link)
+ spa_node_process(p->mix);
+ }
+
return resume_node(node, status);
}