From: Anthony Minessale Date: Tue, 25 Jul 2017 21:08:27 +0000 (-0500) Subject: FS-10379: [mod_conference] Set canvas size based on a variable -- lock width and... X-Git-Tag: v1.8.0~328 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ba4eecbfbee3191a27fc4579a82d17026fb2a38c;p=thirdparty%2Ffreeswitch.git FS-10379: [mod_conference] Set canvas size based on a variable -- lock width and height to even numbers --- diff --git a/src/mod/applications/mod_conference/mod_conference.c b/src/mod/applications/mod_conference/mod_conference.c index c26f7e67a4..af6ab7c57f 100644 --- a/src/mod/applications/mod_conference/mod_conference.c +++ b/src/mod/applications/mod_conference/mod_conference.c @@ -3142,6 +3142,14 @@ conference_obj_t *conference_new(char *name, conference_xml_cfg_t cfg, switch_co } } + if ((canvas_w % 2) != 0) { + canvas_w++; + } + + if ((canvas_h % 2) != 0) { + canvas_h++; + } + if (canvas_w < 320 || canvas_h < 180) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "%s video-canvas-size, falling back to %ux%u\n", video_canvas_size ? "Invalid" : "Unspecified", CONFERENCE_CANVAS_DEFAULT_WIDTH, CONFERENCE_CANVAS_DEFAULT_HIGHT);