FS-10213: [mod_conference] fix crash in video scaling to layer in case of rounding error

This commit is contained in:
Mike Jerris 2017-04-06 18:03:54 -05:00
parent d5dc27c6e6
commit cf39e9c5ae
1 changed files with 3 additions and 0 deletions

View File

@ -769,7 +769,10 @@ void conference_video_scale_and_patch(mcu_layer_t *layer, switch_image_t *ximg,
//printf("B4 %dx%d %dx%d\n", crop_w, crop_h, layer->crop_w, layer->crop_h);
set_pan(crop_w, &layer->crop_w, layer->cam_opts.zoom_accel_speed, layer->cam_opts.zoom_accel_min, layer->cam_opts.zoom_speed);
if (layer->crop_w > img->d_w) layer->crop_w = img->d_w;
layer->crop_h = layer->crop_w / screen_aspect;
if (layer->crop_h > img->d_h) layer->crop_h = img->d_h;
set_bounds(&layer->crop_x, &layer->crop_y, img->d_w, img->d_h, layer->crop_w, layer->crop_h);