mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
module-rtp: Update SAP session if stream properties change
This allows us to propagate changes to session name, destination IP, etc.
This commit is contained in:
parent
2d0bc982bc
commit
35ba50f117
1 changed files with 10 additions and 1 deletions
|
|
@ -835,6 +835,10 @@ static struct session *session_new_announce(struct impl *impl, struct node *node
|
|||
uint32_t port;
|
||||
int res;
|
||||
|
||||
// We want to recreate the session with updated parameters, maybe
|
||||
if (node->session)
|
||||
session_free(node->session);
|
||||
|
||||
if (impl->n_sessions >= MAX_SESSIONS) {
|
||||
pw_log_warn("too many sessions (%u >= %u)", impl->n_sessions, MAX_SESSIONS);
|
||||
errno = EMFILE;
|
||||
|
|
@ -1504,7 +1508,12 @@ static void node_event_info(void *data, const struct pw_node_info *info)
|
|||
struct impl *impl = n->impl;
|
||||
const char *str;
|
||||
|
||||
if (n->session != NULL || info == NULL)
|
||||
if (info == NULL)
|
||||
return;
|
||||
|
||||
// We only really want to do anything here if properties are updated,
|
||||
// or if we don't have a session for this node already
|
||||
if (!(info->change_mask & PW_NODE_CHANGE_MASK_PROPS) && n->session != NULL)
|
||||
return;
|
||||
|
||||
n->info = pw_node_info_merge(n->info, info, true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue