]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-9742
authorAnthony Minessale <anthm@freeswitch.org>
Wed, 16 Nov 2016 22:43:05 +0000 (16:43 -0600)
committerAnthony Minessale <anthm@freeswitch.org>
Wed, 16 Nov 2016 22:43:05 +0000 (16:43 -0600)
src/mod/applications/mod_conference/conference_video.c

index 81ba6704ad88c64c3fcae348b2d5d9be583480d3..7363cbcfc09d675a62ccba52bb4ff7bd58736998 100644 (file)
@@ -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) {