提交 4a90ac8b authored 作者: shripchenko's avatar shripchenko 提交者: Mike Jerris

FS-11363 Fix unpredictable/random zoom, when camera's video aspect ratio (a/r)…

FS-11363 Fix unpredictable/random zoom, when camera's video aspect ratio (a/r) equal to conference layout's tile a/r
上级 5dd44518
......@@ -525,9 +525,9 @@ void conference_video_scale_and_patch(mcu_layer_t *layer, switch_image_t *ximg,
if (img->d_w && layer->last_w) {
if (img->d_w < layer->last_w) {
change_scale = layer->last_w / img->d_w;
change_scale = (double) layer->last_w / img->d_w;
} else {
change_scale = img->d_w / layer->last_w;
change_scale = (double) img->d_w / layer->last_w;
}
layer->crop_x = (int)(layer->crop_x * change_scale);
......@@ -637,7 +637,7 @@ void conference_video_scale_and_patch(mcu_layer_t *layer, switch_image_t *ximg,
int can_zoom = 0;
int did_zoom = 0;
if (screen_aspect < img_aspect) {
if (screen_aspect <= img_aspect) {
if (img->d_h != layer->screen_h) {
scale = (double)layer->screen_h / img->d_h;
}
......@@ -744,7 +744,7 @@ void conference_video_scale_and_patch(mcu_layer_t *layer, switch_image_t *ximg,
} else {
crop_x = use_geometry->x;
}
} else if (screen_aspect < img_aspect) {
} else if (screen_aspect <= img_aspect) {
crop_x = img->w / 4;
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论