]> sjero.net Git - linphone/commitdiff
fix potential crash at end of conference
authorSimon Morlat <simon.morlat@linphone.org>
Mon, 14 Nov 2011 12:50:17 +0000 (13:50 +0100)
committerSimon Morlat <simon.morlat@linphone.org>
Mon, 14 Nov 2011 12:50:17 +0000 (13:50 +0100)
coreapi/conference.c
coreapi/private.h
mediastreamer2

index f72531b9964f14b829a0cc0349ad0f94896bc8ad..51623babeb0d3451c1c50f8198be3e2708ba2799 100644 (file)
@@ -43,6 +43,7 @@ static void remove_local_endpoint(LinphoneConference *ctx){
                ctx->local_endpoint=NULL;
                audio_stream_stop(ctx->local_participant);
                ctx->local_participant=NULL;
+               rtp_profile_destroy(ctx->local_dummy_profile);
        }
 }
 
@@ -96,9 +97,9 @@ static void add_local_endpoint(LinphoneConference *conf,LinphoneCore *lc){
                        lc->sound_conf.lsd_card : lc->sound_conf.play_sndcard;
        MSSndCard *captcard=lc->sound_conf.capt_sndcard;
        const MSAudioConferenceParams *params=ms_audio_conference_get_params(conf->conf);
-       RtpProfile *prof=make_dummy_profile(params->samplerate);
+       conf->local_dummy_profile=make_dummy_profile(params->samplerate);
        
-       audio_stream_start_full(st, prof,
+       audio_stream_start_full(st, conf->local_dummy_profile,
                                "127.0.0.1",
                                65000,
                                65001,
@@ -114,8 +115,7 @@ static void add_local_endpoint(LinphoneConference *conf,LinphoneCore *lc){
        conf->local_participant=st;
        conf->local_endpoint=ms_audio_endpoint_get_from_stream(st,FALSE);
        ms_audio_conference_add_member(conf->conf,conf->local_endpoint);
-       /*normally and exceptionnaly, the profile is no more accessed past this point*/
-       rtp_profile_destroy(prof);
+       
 }
 
 float linphone_core_get_conference_local_input_volume(LinphoneCore *lc){
index 657cd47fd43e2ecec00736a728cc3c950f558442..6853906895636a4a24d8bf5f8c4a983f157b2731 100644 (file)
@@ -405,6 +405,7 @@ struct _LinphoneConference{
        MSAudioConference *conf;
        AudioStream *local_participant;
        MSAudioEndpoint *local_endpoint;
+       RtpProfile *local_dummy_profile;
        bool_t local_muted;
 };
 
index f7bf945917f71afc050edb0968e3262201572a34..4ee916b3fcae0aba38a0d595079298242c9ac2cd 160000 (submodule)
@@ -1 +1 @@
-Subproject commit f7bf945917f71afc050edb0968e3262201572a34
+Subproject commit 4ee916b3fcae0aba38a0d595079298242c9ac2cd