FS-8719: [mod_conference] fix seg when building without video support, but specifying video_mute_png variable for a conference member
This commit is contained in:
parent
3304492b41
commit
aee36dfc59
|
@ -682,7 +682,7 @@ switch_status_t conference_member_add(conference_obj_t *conference, conference_m
|
|||
call_list_t *call_list = NULL;
|
||||
switch_channel_t *channel;
|
||||
const char *controls = NULL, *position = NULL, *var = NULL;
|
||||
|
||||
switch_bool_t has_video = switch_core_has_video();
|
||||
|
||||
switch_assert(conference != NULL);
|
||||
switch_assert(member != NULL);
|
||||
|
@ -760,29 +760,31 @@ switch_status_t conference_member_add(conference_obj_t *conference, conference_m
|
|||
|
||||
conference_video_reset_member_codec_index(member);
|
||||
|
||||
if ((var = switch_channel_get_variable_dup(member->channel, "video_mute_png", SWITCH_FALSE, -1))) {
|
||||
member->video_mute_png = switch_core_strdup(member->pool, var);
|
||||
member->video_mute_img = switch_img_read_png(member->video_mute_png, SWITCH_IMG_FMT_I420);
|
||||
}
|
||||
if (has_video) {
|
||||
if ((var = switch_channel_get_variable_dup(member->channel, "video_mute_png", SWITCH_FALSE, -1))) {
|
||||
member->video_mute_png = switch_core_strdup(member->pool, var);
|
||||
member->video_mute_img = switch_img_read_png(member->video_mute_png, SWITCH_IMG_FMT_I420);
|
||||
}
|
||||
|
||||
if ((var = switch_channel_get_variable_dup(member->channel, "video_reservation_id", SWITCH_FALSE, -1))) {
|
||||
member->video_reservation_id = switch_core_strdup(member->pool, var);
|
||||
}
|
||||
if ((var = switch_channel_get_variable_dup(member->channel, "video_reservation_id", SWITCH_FALSE, -1))) {
|
||||
member->video_reservation_id = switch_core_strdup(member->pool, var);
|
||||
}
|
||||
|
||||
if ((var = switch_channel_get_variable(channel, "video_use_dedicated_encoder")) && switch_true(var)) {
|
||||
conference_utils_member_set_flag_locked(member, MFLAG_NO_MINIMIZE_ENCODING);
|
||||
}
|
||||
|
||||
if ((var = switch_channel_get_variable(member->channel, "rtp_video_max_bandwidth_in"))) {
|
||||
member->max_bw_in = switch_parse_bandwidth_string(var);
|
||||
}
|
||||
|
||||
if ((var = switch_channel_get_variable(member->channel, "rtp_video_max_bandwidth_out"))) {
|
||||
member->max_bw_out = switch_parse_bandwidth_string(var);;
|
||||
|
||||
if (member->max_bw_out < conference->video_codec_settings.video.bandwidth) {
|
||||
if ((var = switch_channel_get_variable(channel, "video_use_dedicated_encoder")) && switch_true(var)) {
|
||||
conference_utils_member_set_flag_locked(member, MFLAG_NO_MINIMIZE_ENCODING);
|
||||
switch_core_media_set_outgoing_bitrate(member->session, SWITCH_MEDIA_TYPE_VIDEO, member->max_bw_out);
|
||||
}
|
||||
|
||||
if ((var = switch_channel_get_variable(member->channel, "rtp_video_max_bandwidth_in"))) {
|
||||
member->max_bw_in = switch_parse_bandwidth_string(var);
|
||||
}
|
||||
|
||||
if ((var = switch_channel_get_variable(member->channel, "rtp_video_max_bandwidth_out"))) {
|
||||
member->max_bw_out = switch_parse_bandwidth_string(var);;
|
||||
|
||||
if (member->max_bw_out < conference->video_codec_settings.video.bandwidth) {
|
||||
conference_utils_member_set_flag_locked(member, MFLAG_NO_MINIMIZE_ENCODING);
|
||||
switch_core_media_set_outgoing_bitrate(member->session, SWITCH_MEDIA_TYPE_VIDEO, member->max_bw_out);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue