FS-7513: don't attach when you don't have video

This commit is contained in:
Anthony Minessale 2015-02-12 10:53:21 -06:00 committed by Michael Jerris
parent a8e8f2e149
commit 47cb08c491
1 changed files with 8 additions and 2 deletions

View File

@ -1097,9 +1097,15 @@ static switch_status_t attach_video_layer(conference_member_t *member, int idx)
switch_status_t status = SWITCH_STATUS_SUCCESS;
const char *banner = NULL;
switch_rgb_color_t color;
if (!member->session) abort();
channel = switch_core_session_get_channel(member->session);
if (!switch_channel_test_flag(channel, CF_VIDEO)) {
return SWITCH_STATUS_FALSE;
}
switch_mutex_lock(member->conference->canvas->mutex);
layer = &member->conference->canvas->layers[idx];
@ -1116,7 +1122,7 @@ static switch_status_t attach_video_layer(conference_member_t *member, int idx)
reset_layer(member->conference->canvas, layer);
channel = switch_core_session_get_channel(member->session);
res_id = switch_channel_get_variable_dup(channel, "video_reservation_id", SWITCH_FALSE, -1);
if (layer->geometry.res_id || res_id) {