fix inactive camera while changing from audio-only to video call

This commit is contained in:
Simon Morlat 2010-11-25 11:41:56 +01:00
parent 7c2fbe2669
commit e1f0bc077a
2 changed files with 4 additions and 3 deletions

View file

@ -75,11 +75,11 @@ void linphone_core_update_streams(LinphoneCore *lc, LinphoneCall *call, SalMedia
/*this happens after pausing the call locally. The streams is destroyed and then we wait the 200Ok to recreate it*/
linphone_call_init_media_streams (call);
}
if (call->state==LinphoneCallIncomingEarlyMedia ||
if (call->state==LinphoneCallIncomingEarlyMedia && linphone_core_get_remote_ringback_tone (lc)!=NULL){
send_ringbacktone=TRUE;
}else if (call->state==LinphoneCallIncomingEarlyMedia ||
(call->state==LinphoneCallOutgoingEarlyMedia && !call->params.real_early_media)){
all_muted=TRUE;
}else if (call->state==LinphoneCallIncomingEarlyMedia && linphone_core_get_remote_ringback_tone (lc)!=NULL){
send_ringbacktone=TRUE;
}
linphone_call_start_media_streams(call,all_muted,send_ringbacktone);
}

View file

@ -2195,6 +2195,7 @@ int linphone_core_update_call(LinphoneCore *lc, LinphoneCall *call, LinphoneCall
sal_media_description_unref(call->localdesc);
call->localdesc=create_local_media_description (lc,call,
params->has_video,FALSE);
call->camera_active=params->has_video;
if (lc->vtable.display_status)
lc->vtable.display_status(lc,_("Modifying call parameters..."));
sal_call_set_local_media_description (call->op,call->localdesc);