From 19b09689c8cc2d018abcd3aab18b51399aa37d47 Mon Sep 17 00:00:00 2001 From: Chris Rienzo Date: Tue, 16 Apr 2019 14:50:52 +0000 Subject: [PATCH] FS-11785 [mod_conference] Fix dead assignments. Removed auto-record-canvas-id param which never did anything. --- .../mod_conference/conference_member.c | 9 ++++----- .../mod_conference/conference_video.c | 2 +- .../mod_conference/mod_conference.c | 17 ++++------------- 3 files changed, 9 insertions(+), 19 deletions(-) diff --git a/src/mod/applications/mod_conference/conference_member.c b/src/mod/applications/mod_conference/conference_member.c index a69e878947..4eebd7a37e 100644 --- a/src/mod/applications/mod_conference/conference_member.c +++ b/src/mod/applications/mod_conference/conference_member.c @@ -570,11 +570,10 @@ void conference_member_add_file_data(conference_member_t *member, int16_t *data, } } else if (member->fnode->type == NODE_TYPE_FILE) { switch_core_file_read(&member->fnode->fh, file_frame, &file_sample_len); - file_data_len = file_sample_len * 2 * member->fnode->fh.channels; - if (member->fnode->fh.vol) { - switch_change_sln_volume_granular((void *)file_frame, (uint32_t)file_sample_len * member->fnode->fh.channels, - member->fnode->fh.vol); - } + if (member->fnode->fh.vol) { + switch_change_sln_volume_granular((void *)file_frame, (uint32_t)file_sample_len * member->fnode->fh.channels, + member->fnode->fh.vol); + } } diff --git a/src/mod/applications/mod_conference/conference_video.c b/src/mod/applications/mod_conference/conference_video.c index ac0be2ccb7..95da2b15e9 100644 --- a/src/mod/applications/mod_conference/conference_video.c +++ b/src/mod/applications/mod_conference/conference_video.c @@ -621,7 +621,7 @@ void conference_video_scale_and_patch(mcu_layer_t *layer, switch_image_t *ximg, double screen_aspect = 0, img_aspect = 0; int x_pos = layer->x_pos; int y_pos = layer->y_pos; - switch_frame_geometry_t *use_geometry = &layer->auto_geometry; + switch_frame_geometry_t *use_geometry = NULL; img_w = layer->screen_w = (uint32_t)(IMG->d_w * layer->geometry.scale / VIDEO_LAYOUT_SCALE); img_h = layer->screen_h = (uint32_t)(IMG->d_h * layer->geometry.hscale / VIDEO_LAYOUT_SCALE); diff --git a/src/mod/applications/mod_conference/mod_conference.c b/src/mod/applications/mod_conference/mod_conference.c index 36c71f7dd6..0694c15de8 100644 --- a/src/mod/applications/mod_conference/mod_conference.c +++ b/src/mod/applications/mod_conference/mod_conference.c @@ -219,13 +219,8 @@ void *SWITCH_THREAD_FUNC conference_thread_run(switch_thread_t *thread, void *ob int16_t *bptr; uint32_t x = 0; int32_t z = 0; - int divisor = 0; conference_cdr_node_t *np; - if (!(divisor = conference->rate / 8000)) { - divisor = 1; - } - file_frame = switch_core_alloc(conference->pool, SWITCH_RECOMMENDED_BUFFER_SIZE); async_file_frame = switch_core_alloc(conference->pool, SWITCH_RECOMMENDED_BUFFER_SIZE); @@ -620,6 +615,10 @@ void *SWITCH_THREAD_FUNC conference_thread_run(switch_thread_t *thread, void *ob memset(write_frame, 255, bytes); ok = switch_buffer_write(omember->mux_buffer, write_frame, bytes); switch_mutex_unlock(omember->audio_out_mutex); + if (!ok) { + switch_mutex_unlock(conference->mutex); + goto end; + } continue; } @@ -2755,7 +2754,6 @@ conference_obj_t *conference_new(char *name, conference_xml_cfg_t cfg, switch_co char *verbose_events = NULL; char *auto_record = NULL; char *recording_metadata = NULL; - int auto_record_canvas = 0; int min_recording_participants = 1; char *conference_log_dir = NULL; char *cdr_event_mode = NULL; @@ -3075,13 +3073,6 @@ conference_obj_t *conference_new(char *name, conference_xml_cfg_t cfg, switch_co auto_record = val; } else if (!strcasecmp(var, "recording-metadata") && !zstr(val)) { recording_metadata = val; - } else if (!strcasecmp(var, "auto-record-canvas-id") && !zstr(val)) { - auto_record_canvas = atoi(val); - if (auto_record_canvas) { - auto_record_canvas--; - - if (auto_record_canvas < 1) auto_record_canvas = 0; - } } else if (!strcasecmp(var, "min-required-recording-participants") && !zstr(val)) { if (!strcmp(val, "1")) { min_recording_participants = 1;