From a3a39f3305bfb20c46d451111ec463a1762a67c2 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 16 Nov 2016 16:43:05 -0600 Subject: [PATCH] FS-9742 --- src/mod/applications/mod_conference/conference_video.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mod/applications/mod_conference/conference_video.c b/src/mod/applications/mod_conference/conference_video.c index 81ba6704ad..7363cbcfc0 100644 --- a/src/mod/applications/mod_conference/conference_video.c +++ b/src/mod/applications/mod_conference/conference_video.c @@ -441,8 +441,10 @@ void conference_video_scale_and_patch(mcu_layer_t *layer, switch_image_t *ximg, if (cropsize < 1) { cropsize = 1; + } else if (cropsize > img->d_w - new_w) { + cropsize = img->d_w - new_w; } - + if (cropsize > 0) { switch_img_set_rect(img, cropsize, 0, new_w, new_h); img_aspect = (double) img->d_w / img->d_h; @@ -466,6 +468,8 @@ void conference_video_scale_and_patch(mcu_layer_t *layer, switch_image_t *ximg, if (cropsize < 1) { cropsize = 1; + } else if (cropsize > img->d_h - new_h) { + cropsize = img->d_h - new_h; } if (cropsize > 0) {