]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-11694 [mod_conference] conference vid-res showing -ERR no reply
authorjoshebosh <bitbucket@joshebosh.email>
Wed, 13 Mar 2019 03:06:34 +0000 (23:06 -0400)
committerMike Jerris <mike@signalwire.com>
Thu, 6 Jun 2019 15:50:05 +0000 (11:50 -0400)
src/mod/applications/mod_conference/conference_api.c

index 248a50a9b0b713dc6899f4474c9339cd53afd475..7fcf005c30abff71110e0a8bbbf6ec191b307636 100644 (file)
@@ -1858,7 +1858,12 @@ switch_status_t conference_api_sub_vid_res(conference_obj_t *conference, switch_
        }
 
        if (canvas_w < 320 || canvas_h < 180) {
-               stream->write_function(stream, "-ERR Invalid size\n");
+               stream->write_function(stream, "-ERR Invalid size, [%dx%d] is too small\n", canvas_w, canvas_h);
+               return SWITCH_STATUS_SUCCESS;
+       }
+
+       if (canvas_w > 7680 || canvas_h > 4320) {
+               stream->write_function(stream, "-ERR Invalid size, [%dx%d] is too large.\n", canvas_w, canvas_h);
                return SWITCH_STATUS_SUCCESS;
        }
 
@@ -1883,7 +1888,11 @@ switch_status_t conference_api_sub_vid_res(conference_obj_t *conference, switch_
                id = 1;
        }
 
-       conference_video_change_res(conference, canvas_w, canvas_h, id - 1);
+       if (conference_video_change_res(conference, canvas_w, canvas_h, id - 1) == SWITCH_STATUS_SUCCESS) {
+               stream->write_function(stream, "+OK Resolution set to [%dx%d]\n", canvas_w, canvas_h);
+       } else {
+               stream->write_function(stream, "-ERR Resolution not set\n");
+       }
        
        return SWITCH_STATUS_SUCCESS;
 }