Commit df6e2005 authored by Simon Morlat's avatar Simon Morlat

fix leaked streams in case of incoming call declined because media incompatible

parent 2f415bc6
......@@ -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
......
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment