media-session: only enable session when format is known

This commit is contained in:
Wim Taymans 2018-10-15 12:46:50 +02:00
parent b3189bb5e7
commit 2b096993ed

View file

@ -508,7 +508,7 @@ handle_node(struct impl *impl, uint32_t id, uint32_t parent_id,
sess->direction = direction;
sess->id = id;
sess->need_dsp = need_dsp;
sess->enabled = true;
sess->enabled = false;
sess->starting = true;
sess->node = node;
if ((str = spa_dict_lookup(props, "node.plugged")) != NULL)
@ -564,8 +564,11 @@ static void port_event_param(void *object,
if (spa_format_audio_raw_parse(param, &info) < 0)
return;
if (info.channels > node->format.channels)
if (info.channels > node->format.channels) {
node->format = info;
if (node->manager)
node->manager->enabled = true;
}
}
static const struct pw_port_proxy_events port_events = {