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:
Wim Taymans 2019-10-18 21:52:24 +02:00
parent 92d5c179d6
commit 1eca773145

View file

@ -305,6 +305,7 @@ 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);
n->info = pw_node_info_update(n->info, info);
if (info->change_mask & PW_NODE_CHANGE_MASK_STATE) {
switch (info->state) {
case PW_NODE_STATE_IDLE:
on_node_idle(impl, n);
@ -317,6 +318,7 @@ static void node_event_info(void *object, const struct pw_node_info *info)
default:
break;
}
}
}
static void node_event_param(void *object, int seq,