Browse Source

fix ICE when no candidates are present (trickle ICE)

use presence of ufrag attribute to detect ICE support instead of
candidates
mr3.8.2
Richard Fuchs 11 years ago
parent
commit
0270dff63d
1 changed files with 8 additions and 6 deletions
  1. +8
    -6
      daemon/sdp.c

+ 8
- 6
daemon/sdp.c View File

@ -1142,12 +1142,17 @@ static void __sdp_ice(struct stream_params *sp, struct sdp_media *media) {
GQueue *q;
GList *ql;
q = attr_list_get_by_id(&media->attributes, ATTR_CANDIDATE);
if (!q)
attr = attr_get_by_id_m_s(media, ATTR_ICE_UFRAG);
if (!attr)
return;
sp->ice_ufrag = attr->value;
SP_SET(sp, ICE);
q = attr_list_get_by_id(&media->attributes, ATTR_CANDIDATE);
if (!q)
goto no_cand;
for (ql = q->head; ql; ql = ql->next) {
attr = ql->data;
ac = &attr->u.candidate;
@ -1158,6 +1163,7 @@ static void __sdp_ice(struct stream_params *sp, struct sdp_media *media) {
g_queue_push_tail(&sp->ice_candidates, cand);
}
no_cand:
if ((attr = attr_get_by_id(&media->attributes, ATTR_ICE_OPTIONS))) {
if (str_str(&attr->value, "trickle") >= 0)
SP_SET(sp, TRICKLE_ICE);
@ -1168,10 +1174,6 @@ static void __sdp_ice(struct stream_params *sp, struct sdp_media *media) {
if (attr_get_by_id(&media->attributes, ATTR_ICE_LITE))
SP_SET(sp, ICE_LITE);
attr = attr_get_by_id_m_s(media, ATTR_ICE_UFRAG);
if (attr)
sp->ice_ufrag = attr->value;
attr = attr_get_by_id_m_s(media, ATTR_ICE_PWD);
if (attr)
sp->ice_pwd = attr->value;


Loading…
Cancel
Save