提交 cf39e9c5 authored 作者: Mike Jerris's avatar Mike Jerris

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

上级 d5dc27c6
...@@ -769,7 +769,10 @@ void conference_video_scale_and_patch(mcu_layer_t *layer, switch_image_t *ximg, ...@@ -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); //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); 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; 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); set_bounds(&layer->crop_x, &layer->crop_y, img->d_w, img->d_h, layer->crop_w, layer->crop_h);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论