mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
media-session: only deal with state when it changed
Look at the change_mask and only deal with the state when it changed or else we might start the idle timer again when something unrelated changed.
This commit is contained in:
parent
92d5c179d6
commit
1eca773145
1 changed files with 13 additions and 11 deletions
|
|
@ -305,17 +305,19 @@ static void node_event_info(void *object, const struct pw_node_info *info)
|
||||||
pw_log_debug(NAME" %p: info for node %d type %d", impl, n->obj.id, n->type);
|
pw_log_debug(NAME" %p: info for node %d type %d", impl, n->obj.id, n->type);
|
||||||
n->info = pw_node_info_update(n->info, info);
|
n->info = pw_node_info_update(n->info, info);
|
||||||
|
|
||||||
switch (info->state) {
|
if (info->change_mask & PW_NODE_CHANGE_MASK_STATE) {
|
||||||
case PW_NODE_STATE_IDLE:
|
switch (info->state) {
|
||||||
on_node_idle(impl, n);
|
case PW_NODE_STATE_IDLE:
|
||||||
break;
|
on_node_idle(impl, n);
|
||||||
case PW_NODE_STATE_RUNNING:
|
break;
|
||||||
on_node_running(impl, n);
|
case PW_NODE_STATE_RUNNING:
|
||||||
break;
|
on_node_running(impl, n);
|
||||||
case PW_NODE_STATE_SUSPENDED:
|
break;
|
||||||
break;
|
case PW_NODE_STATE_SUSPENDED:
|
||||||
default:
|
break;
|
||||||
break;
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue