fix config storage for ptimes (was not consistent)

This commit is contained in:
Simon Morlat 2012-09-10 21:25:21 +02:00
parent 5501bf7015
commit c5f1290f25
3 changed files with 3 additions and 4 deletions

View file

@ -223,7 +223,7 @@ static SalMediaDescription *_create_local_media_description(LinphoneCore *lc, Li
if (call->params.down_ptime)
md->streams[0].ptime=call->params.down_ptime;
else
md->streams[0].ptime=lc->net_conf.down_ptime;
md->streams[0].ptime=linphone_core_get_download_ptime(lc);
l=make_codec_list(lc,lc->codecs_conf.audio_codecs,call->params.audio_bw,&md->streams[0].max_rate);
pt=payload_type_clone(rtp_profile_get_payload_from_mime(&av_profile,"telephone-event"));
l=ms_list_append(l,pt);

View file

@ -967,14 +967,14 @@ int linphone_core_get_upload_bandwidth(const LinphoneCore *lc){
* Set audio packetization time linphone expects to receive from peer
*/
void linphone_core_set_download_ptime(LinphoneCore *lc, int ptime) {
lc->net_conf.down_ptime=ptime;
lp_config_set_int(lc->config,"rtp","download_ptime",ptime);
}
/**
* Get audio packetization time linphone expects to receive from peer
*/
int linphone_core_get_download_ptime(LinphoneCore *lc) {
return lc->net_conf.down_ptime;
return lp_config_get_int(lc->config,"rtp","download_ptime",0);
}
/**

View file

@ -409,7 +409,6 @@ typedef struct net_config
int upload_bw;
int firewall_policy;
int mtu;
int down_ptime;
bool_t nat_sdp_only;
}net_config_t;