From 974daa4bb5b8011cf90b1adfb99cf09e9f349cb9 Mon Sep 17 00:00:00 2001 From: Ronan Abhamon Date: Mon, 22 May 2017 16:44:24 +0200 Subject: [PATCH] fix(linphonecall): test conference context before `on_call_stream_starting` call --- coreapi/linphonecall.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/coreapi/linphonecall.c b/coreapi/linphonecall.c index dc4c83a49..e8aee4deb 100644 --- a/coreapi/linphonecall.c +++ b/coreapi/linphonecall.c @@ -1109,18 +1109,18 @@ static void linphone_call_init_common(LinphoneCall *call, LinphoneAddress *from, linphone_call_init_stats(call->audio_stats, LINPHONE_CALL_STATS_AUDIO); linphone_call_init_stats(call->video_stats, LINPHONE_CALL_STATS_VIDEO); linphone_call_init_stats(call->text_stats, LINPHONE_CALL_STATS_TEXT); - + if (call->dest_proxy == NULL) { /* Try to define the destination proxy if it has not already been done to have a correct contact field in the SIP messages */ call->dest_proxy = linphone_core_lookup_known_proxy(call->core, call->log->to); } - - + + if (call->dest_proxy != NULL) call->nat_policy = linphone_proxy_config_get_nat_policy(call->dest_proxy); if (call->nat_policy == NULL) call->nat_policy = linphone_core_get_nat_policy(call->core); - + linphone_nat_policy_ref(call->nat_policy); } @@ -3506,7 +3506,7 @@ static void linphone_call_start_audio_stream(LinphoneCall *call, LinphoneCallSta setup_ring_player(lc,call); } - if (call->params->in_conference){ + if (call->params->in_conference && lc->conf_ctx){ /*transform the graph to connect it to the conference filter */ mute = stream->dir==SalStreamRecvOnly; linphone_conference_on_call_stream_starting(lc->conf_ctx, call, mute);