mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-07 05:53:06 +00:00
avoid crashing when no soundcard is present.
update ms2
This commit is contained in:
parent
c05a0f099c
commit
5dea3b42f0
3 changed files with 13 additions and 9 deletions
|
|
@ -68,14 +68,14 @@ int sal_publish(SalOp *op, const char *from, const char *to, const char *eventna
|
|||
op->type=SalOpPublish;
|
||||
req=sal_op_build_request(op,"PUBLISH");
|
||||
belle_sip_message_add_header(BELLE_SIP_MESSAGE(req),belle_sip_header_create("Event",eventname));
|
||||
if (body) sal_op_add_body(op,BELLE_SIP_MESSAGE(req),body);
|
||||
sal_op_add_body(op,BELLE_SIP_MESSAGE(req),body);
|
||||
return sal_op_send_and_create_refresher(op,req,expires,publish_refresher_listener);
|
||||
} else {
|
||||
/*update status*/
|
||||
const belle_sip_client_transaction_t* last_publish_trans=belle_sip_refresher_get_transaction(op->refresher);
|
||||
belle_sip_request_t* last_publish=belle_sip_transaction_get_request(BELLE_SIP_TRANSACTION(last_publish_trans));
|
||||
/*update body*/
|
||||
if (body) sal_op_add_body(op,BELLE_SIP_MESSAGE(last_publish),body);
|
||||
sal_op_add_body(op,BELLE_SIP_MESSAGE(last_publish),body);
|
||||
return belle_sip_refresher_refresh(op->refresher,BELLE_SIP_REFRESHER_REUSE_EXPIRES);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2487,11 +2487,13 @@ int linphone_core_start_invite(LinphoneCore *lc, LinphoneCall *call){
|
|||
linphone_call_make_local_media_description(lc,call);
|
||||
|
||||
if (lc->ringstream==NULL) {
|
||||
/*give a chance a set card prefered sampling frequency*/
|
||||
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);
|
||||
if (lc->sound_conf.play_sndcard && lc->sound_conf.capt_sndcard){
|
||||
/*give a chance a set card prefered sampling frequency*/
|
||||
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);
|
||||
}
|
||||
audio_stream_prepare_sound(call->audiostream,lc->sound_conf.play_sndcard,lc->sound_conf.capt_sndcard);
|
||||
}
|
||||
|
||||
if (!lc->sip_conf.sdp_200_ack){
|
||||
|
|
@ -3241,8 +3243,10 @@ int linphone_core_accept_call_with_params(LinphoneCore *lc, LinphoneCall *call,
|
|||
/*give a chance a set card prefered sampling frequency*/
|
||||
if (call->localdesc->streams[0].max_rate>0) {
|
||||
ms_message ("configuring prefered card sampling rate to [%i]",call->localdesc->streams[0].max_rate);
|
||||
ms_snd_card_set_preferred_sample_rate(lc->sound_conf.play_sndcard, call->localdesc->streams[0].max_rate);
|
||||
ms_snd_card_set_preferred_sample_rate(lc->sound_conf.capt_sndcard, call->localdesc->streams[0].max_rate);
|
||||
if (lc->sound_conf.play_sndcard)
|
||||
ms_snd_card_set_preferred_sample_rate(lc->sound_conf.play_sndcard, call->localdesc->streams[0].max_rate);
|
||||
if (lc->sound_conf.capt_sndcard)
|
||||
ms_snd_card_set_preferred_sample_rate(lc->sound_conf.capt_sndcard, call->localdesc->streams[0].max_rate);
|
||||
}
|
||||
|
||||
if (!was_ringing && call->audiostream->ms.ticker==NULL){
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit c516f225bea6ac2132f3468235138e2dde6cfcda
|
||||
Subproject commit ec2d04150521197905bf5812991b54bab97fbdf8
|
||||
Loading…
Add table
Reference in a new issue