fix compilation error and fix bug when updating preview in linphone_core_set_preferred_video_size()

This commit is contained in:
Simon Morlat 2014-08-06 17:26:50 +02:00
parent 45bc8f1fa7
commit 2b04532518
2 changed files with 5 additions and 3 deletions

View file

@ -900,7 +900,7 @@ static int codec_compare(const PayloadType *a, const PayloadType *b){
rb=find_codec_rank(b->mime_type,b->clock_rate);
if (ra>rb) return 1;
if (ra<rb) return -1;
return 0;
return 1;
}
static MSList *add_missing_codecs(LinphoneCore *lc, SalStreamType mtype, MSList *l){
@ -5359,11 +5359,13 @@ static void update_preview_size(LinphoneCore *lc, MSVideoSize oldvsize, MSVideoS
void linphone_core_set_preferred_video_size(LinphoneCore *lc, MSVideoSize vsize){
if (video_size_supported(vsize)){
MSVideoSize oldvsize=lc->video_conf.preview_vsize;
if (oldvsize.width==0){
oldvsize=lc->video_conf.vsize;
update_preview_size(lc,oldvsize,vsize);
}
lc->video_conf.vsize=vsize;
update_preview_size(lc,oldvsize,vsize);
if (linphone_core_ready(lc))
lp_config_set_string(lc->config,"video","size",video_size_get_name(vsize));
}

View file

@ -607,7 +607,7 @@ int linphone_upnp_context_send_add_port_binding(UpnpContext *lupnp, UpnpPortBind
mapping.remote_port = port->external_port;
mapping.remote_host = "";
snprintf(description, 128, "%s %s at %s:%d",
PACKAGE_NAME,
"Linphone",
(port->protocol == UPNP_IGD_IP_PROTOCOL_TCP)? "TCP": "UDP",
port->local_addr, port->local_port);
mapping.description = description;