diff --git a/coreapi/linphonecall.c b/coreapi/linphonecall.c index 0700577dc..88e7c49e2 100644 --- a/coreapi/linphonecall.c +++ b/coreapi/linphonecall.c @@ -2086,12 +2086,15 @@ void linphone_call_stop_video_stream(LinphoneCall *call) { } void linphone_call_stop_media_streams(LinphoneCall *call){ - linphone_call_stop_audio_stream(call); - linphone_call_stop_video_stream(call); + if (call->audiostream || call->videostream) { + linphone_call_stop_audio_stream(call); + linphone_call_stop_video_stream(call); - if (call->core->msevq != NULL) { - ms_event_queue_skip(call->core->msevq); + if (call->core->msevq != NULL) { + ms_event_queue_skip(call->core->msevq); + } } + if (call->audio_profile){ rtp_profile_destroy(call->audio_profile); call->audio_profile=NULL;