From e1f0bc077a2d985e440b0beea259dc47e73473f8 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Thu, 25 Nov 2010 11:41:56 +0100 Subject: [PATCH] fix inactive camera while changing from audio-only to video call --- coreapi/callbacks.c | 6 +++--- coreapi/linphonecore.c | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/coreapi/callbacks.c b/coreapi/callbacks.c index 30de2b0c4..480b21655 100644 --- a/coreapi/callbacks.c +++ b/coreapi/callbacks.c @@ -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); } diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index d38a5d6d3..059315b64 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -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);