diff --git a/linphone/mediastreamer2/src/videostream.c b/linphone/mediastreamer2/src/videostream.c index 92faf54a9..34a9a0f8c 100644 --- a/linphone/mediastreamer2/src/videostream.c +++ b/linphone/mediastreamer2/src/videostream.c @@ -128,7 +128,7 @@ static void video_steam_process_rtcp(VideoStream *stream, mblk_t *m){ unsigned int ij; float flost; ij=report_block_get_interarrival_jitter(rb); - flost=100.0*report_block_get_fraction_lost(rb)/256.0; + flost=(float)(100.0*report_block_get_fraction_lost(rb)/256.0); ms_message("interarrival jitter=%u , lost packets percentage since last report=%f ",ij,flost); if (stream->adapt_bitrate) video_stream_adapt_bitrate(stream,ij,flost); } @@ -360,7 +360,7 @@ VideoStream * video_preview_start(MSWebCam *device, MSVideoSize disp_size){ VideoStream *stream = (VideoStream *)ms_new0 (VideoStream, 1); MSVideoSize vsize=disp_size; MSPixFmt format; - float fps=29.97; + float fps=(float)29.97; int mirroring=1; /* creates the filters */ diff --git a/linphone/mediastreamer2/src/winvideo2.c b/linphone/mediastreamer2/src/winvideo2.c index a5ec16c4f..eb64ae2ae 100755 --- a/linphone/mediastreamer2/src/winvideo2.c +++ b/linphone/mediastreamer2/src/winvideo2.c @@ -366,11 +366,11 @@ static void vfw_process(MSFilter * obj){ int cur_frame; if (s->frame_count==-1){ - s->start_time=obj->ticker->time; + s->start_time=(float)obj->ticker->time; s->frame_count=0; } - cur_frame=((obj->ticker->time-s->start_time)*s->fps/1000.0); + cur_frame=(int)((obj->ticker->time-s->start_time)*s->fps/1000.0); if (cur_frame>s->frame_count){ mblk_t *om=NULL; /*keep the most recent frame if several frames have been captured */ @@ -385,7 +385,7 @@ static void vfw_process(MSFilter * obj){ ms_mutex_unlock(&s->mutex); } if (om!=NULL){ - timestamp=obj->ticker->time*90;/* rtp uses a 90000 Hz clockrate for video*/ + timestamp=(uint32_t)(obj->ticker->time*90);/* rtp uses a 90000 Hz clockrate for video*/ mblk_set_timestamp_info(om,timestamp); ms_queue_put(obj->outputs[0],om); }