mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-07 05:53:06 +00:00
Fixed nb_stream variable in resultdesc and fixed test to detect change between two media descs
This commit is contained in:
parent
cae3cd4f8d
commit
84a59d62f1
2 changed files with 4 additions and 2 deletions
|
|
@ -564,6 +564,7 @@ int offer_answer_initiate_incoming(const SalMediaDescription *local_capabilities
|
|||
SalMediaDescription *result, bool_t one_matching_codec){
|
||||
int i;
|
||||
const SalStreamDescription *ls=NULL,*rs;
|
||||
result->nb_streams = 0;
|
||||
|
||||
for(i=0;i<SAL_MEDIA_DESCRIPTION_MAX_STREAMS;++i){
|
||||
rs=&remote_offer->streams[i];
|
||||
|
|
@ -588,6 +589,7 @@ int offer_answer_initiate_incoming(const SalMediaDescription *local_capabilities
|
|||
result->streams[i].rtcp_xr.enabled = TRUE;
|
||||
}
|
||||
}
|
||||
result->nb_streams++;
|
||||
}else {
|
||||
ms_message("Declining mline %i, no corresponding stream in local capabilities description.",i);
|
||||
/* create an inactive stream for the answer, as there where no matching stream in local capabilities */
|
||||
|
|
@ -603,7 +605,7 @@ int offer_answer_initiate_incoming(const SalMediaDescription *local_capabilities
|
|||
}
|
||||
}
|
||||
}
|
||||
result->nb_streams=i;
|
||||
|
||||
strcpy(result->username, local_capabilities->username);
|
||||
strcpy(result->addr,local_capabilities->addr);
|
||||
result->bandwidth=local_capabilities->bandwidth;
|
||||
|
|
|
|||
|
|
@ -342,7 +342,7 @@ int sal_media_description_equals(const SalMediaDescription *md1, const SalMediaD
|
|||
if (md1->nb_streams != md2->nb_streams) result |= SAL_MEDIA_DESCRIPTION_STREAMS_CHANGED;
|
||||
if (md1->bandwidth != md2->bandwidth) result |= SAL_MEDIA_DESCRIPTION_CODEC_CHANGED;
|
||||
for(i = 0; i < SAL_MEDIA_DESCRIPTION_MAX_STREAMS; ++i){
|
||||
if (!sal_stream_description_active(&md1->streams[i]) || !sal_stream_description_active(&md2->streams[i])) continue;
|
||||
if (!sal_stream_description_active(&md1->streams[i]) && !sal_stream_description_active(&md2->streams[i])) continue;
|
||||
result |= sal_stream_description_equals(&md1->streams[i], &md2->streams[i]);
|
||||
}
|
||||
return result;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue