mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-05 13:30:02 -05:00
media-session: only enable session when format is known
This commit is contained in:
parent
b3189bb5e7
commit
2b096993ed
1 changed files with 5 additions and 2 deletions
|
|
@ -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 = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue