]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-10379: [mod_conference] Set canvas size based on a variable -- lock width and...
authorAnthony Minessale <anthm@freeswitch.org>
Tue, 25 Jul 2017 21:08:27 +0000 (16:08 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Tue, 25 Jul 2017 21:08:52 +0000 (16:08 -0500)
src/mod/applications/mod_conference/mod_conference.c

index 848fbf135706fa9df7276f8fb877cf0d0208c28c..2686b2a53ba4c06e2746de85f57917e58861f3b6 100644 (file)
@@ -2911,6 +2911,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);