Commit d9e5d103 authored by Simon Morlat's avatar Simon Morlat
Browse files

fix empty mline again and update ms2

parent 49c5f146
......@@ -859,7 +859,7 @@ void linphone_call_start_media_streams(LinphoneCall *call, bool_t all_inputs_mut
{
const SalStreamDescription *stream=sal_media_description_find_stream(call->resultdesc,
SalProtoRtpAvp,SalAudio);
if (stream && stream->dir!=SalStreamInactive){
if (stream && stream->dir!=SalStreamInactive && stream->port!=0){
MSSndCard *playcard=lc->sound_conf.lsd_card ?
lc->sound_conf.lsd_card : lc->sound_conf.play_sndcard;
MSSndCard *captcard=lc->sound_conf.capt_sndcard;
......@@ -941,7 +941,7 @@ void linphone_call_start_media_streams(LinphoneCall *call, bool_t all_inputs_mut
lc->previewstream=NULL;
}
call->current_params.has_video=FALSE;
if (vstream && vstream->dir!=SalStreamInactive) {
if (vstream && vstream->dir!=SalStreamInactive && vstream->port!=0) {
const char *addr=vstream->addr[0]!='\0' ? vstream->addr : call->resultdesc->addr;
call->video_profile=make_profile(call,call->resultdesc,vstream,&used_pt);
if (used_pt!=-1){
......
......@@ -232,7 +232,6 @@ int offer_answer_initiate_incoming(const SalMediaDescription *local_capabilities
result->streams[i].dir=SalStreamInactive;
result->streams[i].port=0;
result->streams[i].type=rs->type;
result->streams[i].payloads=remote_offer->streams[i].payloads;
if (rs->type==SalOther){
strncpy(result->streams[i].typeother,rs->typeother,sizeof(rs->typeother)-1);
}
......
......@@ -241,8 +241,14 @@ static void add_line(sdp_message_t *msg, int lineno, const SalStreamDescription
if (desc->ptime>0) sdp_message_a_attribute_add(msg,lineno,osip_strdup("ptime"),
int_2char(desc->ptime));
strip_well_known_rtpmaps=ms_list_size(desc->payloads)>5;
for(elem=desc->payloads;elem!=NULL;elem=elem->next){
add_payload(msg, lineno, (PayloadType*)elem->data,strip_well_known_rtpmaps);
if (desc->payloads){
for(elem=desc->payloads;elem!=NULL;elem=elem->next){
add_payload(msg, lineno, (PayloadType*)elem->data,strip_well_known_rtpmaps);
}
}else{
/* to comply with SDP we cannot have an empty payload type number list */
/* as it happens only when mline is declined with a zero port, it does not matter to put whatever codec*/
sdp_message_m_payload_add (msg,lineno, int_2char (0));
}
switch(desc->dir){
case SalStreamSendRecv:
......
mediastreamer2 @ 8b9173fc
Subproject commit 92316f7a8793fe30e0d111d4b9043b76dcb8e726
Subproject commit 8b9173fca31595a48c7ef597edb412aea2d2871f
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment