From 63b1c6196d9bf19d1542d2d0113af6c8cd41b990 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Thu, 6 Aug 2015 11:16:14 +0200 Subject: [PATCH] don't call prepare_sound with soundcards when the core is in use_files mode. It makes double instanciation of card readers causing crashes on iOS --- coreapi/linphonecore.c | 5 +++-- mediastreamer2 | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index 00ec99070..2dfe46e8c 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -2775,7 +2775,8 @@ int linphone_core_start_invite(LinphoneCore *lc, LinphoneCall *call, const Linph if (call->localdesc->streams[0].max_rate>0) { ms_snd_card_set_preferred_sample_rate(lc->sound_conf.play_sndcard, call->localdesc->streams[0].max_rate); } - audio_stream_prepare_sound(call->audiostream,lc->sound_conf.play_sndcard,lc->sound_conf.capt_sndcard); + if (!lc->use_files) + audio_stream_prepare_sound(call->audiostream,lc->sound_conf.play_sndcard,lc->sound_conf.capt_sndcard); } } real_url=linphone_address_as_string( destination ? destination : call->log->to); @@ -3612,7 +3613,7 @@ int linphone_core_accept_call_with_params(LinphoneCore *lc, LinphoneCall *call, ms_snd_card_set_preferred_sample_rate(lc->sound_conf.capt_sndcard, call->localdesc->streams[0].max_rate); } - if (!was_ringing && call->audiostream->ms.state==MSStreamInitialized){ + if (!was_ringing && call->audiostream->ms.state==MSStreamInitialized && !lc->use_files){ audio_stream_prepare_sound(call->audiostream,lc->sound_conf.play_sndcard,lc->sound_conf.capt_sndcard); } diff --git a/mediastreamer2 b/mediastreamer2 index 5a0a6c56a..5ca97404c 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit 5a0a6c56ab973a920e275708e732ed5c4688aa4d +Subproject commit 5ca97404c6466c6bec2a44deddaadb48a522c2b8