From df6e200585a62d95034032eef996fedf5a3f2015 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Tue, 19 Nov 2013 12:04:06 +0100 Subject: [PATCH] fix leaked streams in case of incoming call declined because media incompatible --- coreapi/linphonecall.c | 1 + coreapi/linphonecore.c | 1 + 2 files changed, 2 insertions(+) diff --git a/coreapi/linphonecall.c b/coreapi/linphonecall.c index 7c24bbbd4..6786209cd 100644 --- a/coreapi/linphonecall.c +++ b/coreapi/linphonecall.c @@ -762,6 +762,7 @@ void linphone_call_set_state(LinphoneCall *call, LinphoneCallState cstate, const static void linphone_call_destroy(LinphoneCall *obj) { ms_message("Call [%p] freed.",obj); + linphone_call_stop_media_streams(obj); #ifdef BUILD_UPNP linphone_call_delete_upnp_session(obj); #endif //BUILD_UPNP diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index df4be1090..fdf54e745 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -2852,6 +2852,7 @@ void linphone_core_notify_incoming_call(LinphoneCore *lc, LinphoneCall *call){ if (md){ if (sal_media_description_empty(md) || linphone_core_incompatible_security(lc,md)){ sal_call_decline(call->op,SalReasonMedia,NULL); + linphone_call_stop_media_streams(call); linphone_core_del_call(lc,call); linphone_call_unref(call); return;