node: handle target without node

This commit is contained in:
Wim Taymans 2019-09-03 13:57:20 +02:00
parent 73628c91de
commit bd2d0ebc75

View file

@ -1316,11 +1316,13 @@ static int node_ready(void *data, int status)
spa_list_for_each(t, &driver->rt.target_list, link) { spa_list_for_each(t, &driver->rt.target_list, link) {
struct pw_node_activation *ta = t->activation; struct pw_node_activation *ta = t->activation;
uint32_t id = t->node->info.id;
ta->status = PW_NODE_ACTIVATION_NOT_TRIGGERED; ta->status = PW_NODE_ACTIVATION_NOT_TRIGGERED;
pw_node_activation_state_reset(&ta->state[0]); pw_node_activation_state_reset(&ta->state[0]);
if (t->node) {
uint32_t id = t->node->info.id;
/* this is the node with reposition info */ /* this is the node with reposition info */
if (id == reposition_owner) if (id == reposition_owner)
reposition_node = t->node; reposition_node = t->node;
@ -1330,6 +1332,7 @@ static int node_ready(void *data, int status)
a->position.segments[0].bar = ta->segment.bar; a->position.segments[0].bar = ta->segment.bar;
if (id == owner[1]) if (id == owner[1])
a->position.segments[0].video = ta->segment.video; a->position.segments[0].video = ta->segment.video;
}
if (update_sync) { if (update_sync) {
ta->pending_sync = target_sync; ta->pending_sync = target_sync;