Fix ringstream instanciation.

This commit is contained in:
Simon Morlat 2017-11-21 13:59:30 +01:00
parent bb0d2409bd
commit 9ffab5906b

View file

@ -5579,10 +5579,11 @@ static MSFilter *get_audio_resource(LinphoneCore *lc, LinphoneAudioResourceType
if (rtype==LinphoneLocalPlayer) return stream->local_player;
return NULL;
}
if (card || lc->ringstream == NULL) {
if (lc->ringstream)
if (card && lc->ringstream && card != lc->ringstream->card){
ring_stop(lc->ringstream);
lc->ringstream = NULL;
}
if (lc->ringstream == NULL) {
float amp=lp_config_get_float(lc->config,"sound","dtmf_player_amp",0.1f);
MSSndCard *ringcard=lc->sound_conf.lsd_card
? lc->sound_conf.lsd_card