FS-11057: [mod_conference] CPU race on personal canvas #resolve

This commit is contained in:
Mike Jerris 2018-03-28 12:11:15 -04:00 committed by Muteesa Fred
parent 9e3bbdd10c
commit f193aff269

View File

@ -806,6 +806,8 @@ switch_status_t conference_member_add(conference_obj_t *conference, conference_m
conference_video_reset_member_codec_index(member);
if (has_video) {
int bitrate = conference->video_codec_settings.video.bandwidth;
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);
@ -832,15 +834,17 @@ switch_status_t conference_member_add(conference_obj_t *conference, conference_m
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);
}
bitrate = member->max_bw_out;
}
}
if (conference->video_codec_settings.video.bandwidth) {
switch_core_media_set_outgoing_bitrate(member->session, SWITCH_MEDIA_TYPE_VIDEO, conference->video_codec_settings.video.bandwidth);
if (bitrate) {
switch_core_media_set_outgoing_bitrate(member->session, SWITCH_MEDIA_TYPE_VIDEO, bitrate);
}
}
switch_channel_set_variable_printf(channel, "conference_member_id", "%d", member->id);
switch_channel_set_variable_printf(channel, "conference_moderator", "%s", conference_utils_member_test_flag(member, MFLAG_MOD) ? "true" : "false");
switch_channel_set_variable_printf(channel, "conference_ghost", "%s", conference_utils_member_test_flag(member, MFLAG_GHOST) ? "true" : "false");