Skip to content

Commit

Permalink
Fix problem of duplicate mid attribute in Janus SDPs (fixes #2917)
Browse files Browse the repository at this point in the history
  • Loading branch information
lminiero committed Mar 8, 2022
1 parent 71c5c07 commit d9e0213
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/sdp.c
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,12 @@ int janus_sdp_process_local(void *ice_handle, janus_sdp *remote_sdp, gboolean up
}
if(handle->pc_mid == NULL)
handle->pc_mid = g_strdup(a->value);
/* Remove this mid attribute, the core will add it again later */
GList *mid_attr = tempA;
tempA = tempA->next;
m->attributes = g_list_remove_link(m->attributes, mid_attr);
g_list_free_full(mid_attr, (GDestroyNotify)janus_sdp_attribute_destroy);
continue;
}
}
tempA = tempA->next;
Expand Down

0 comments on commit d9e0213

Please sign in to comment.