From 53600691960bb4c1e8d610ee17037327e2da7ea3 Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Fri, 14 Oct 2011 17:36:44 +0200 Subject: [PATCH] Conference's pause/resume issue fixed --- coreapi/callbacks.c | 5 ++++- coreapi/linphonecall.c | 8 +++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/coreapi/callbacks.c b/coreapi/callbacks.c index 2470606ab..550c98736 100644 --- a/coreapi/callbacks.c +++ b/coreapi/callbacks.c @@ -400,6 +400,8 @@ static void call_updating(SalOp *op){ if (md && !sal_media_description_empty(md)) { + linphone_core_update_streams (lc,call,md); + if (sal_media_description_has_dir(call->localdesc,SalStreamSendRecv)){ ms_message("Our local status is SalStreamSendRecv"); if (sal_media_description_has_dir (md,SalStreamRecvOnly) || sal_media_description_has_dir(md,SalStreamInactive)){ @@ -415,12 +417,13 @@ static void call_updating(SalOp *op){ lc->current_call=call; }else{ prevstate=call->state; + if(lc->vtable.display_status) + lc->vtable.display_status(lc,_("Call has been updated by remote...")); linphone_call_set_state(call, LinphoneCallUpdatedByRemote,"Call updated by remote"); } } /*accept the modification (sends a 200Ok)*/ sal_call_accept(op); - linphone_core_update_streams (lc,call,md); if (prevstate!=LinphoneCallIdle){ linphone_call_set_state (call,prevstate,"Connected (streams running)"); } diff --git a/coreapi/linphonecall.c b/coreapi/linphonecall.c index 15b1aa723..cbe12af74 100644 --- a/coreapi/linphonecall.c +++ b/coreapi/linphonecall.c @@ -1083,7 +1083,7 @@ static void linphone_call_start_video_stream(LinphoneCall *call, const char *cna lc->previewstream=NULL; } call->current_params.has_video=FALSE; - if (vstream && vstream->dir!=SalStreamInactive && vstream->port!=0) { + if (vstream!=NULL && 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){ @@ -1158,13 +1158,15 @@ void linphone_call_start_media_streams(LinphoneCall *call, bool_t all_inputs_mut cname=linphone_address_as_string_uri_only(me); #if defined(VIDEO_ENABLED) - if (vstream && vstream->dir!=SalStreamInactive && vstream->payloads!=NULL){ + if (vstream!=NULL && vstream->dir!=SalStreamInactive && vstream->payloads!=NULL){ /*when video is used, do not make adaptive rate control on audio, it is stupid.*/ use_arc=FALSE; } #endif linphone_call_start_audio_stream(call,cname,all_inputs_muted,send_ringbacktone,use_arc); - if (call->videostream!=NULL) linphone_call_start_video_stream(call,cname,all_inputs_muted); + if (call->videostream!=NULL) { + linphone_call_start_video_stream(call,cname,all_inputs_muted); + } call->all_muted=all_inputs_muted; call->playing_ringbacktone=send_ringbacktone;