From a6e9dbaded5ceb0ef083b8fee228ca455c410b2a Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 26 Apr 2017 15:25:04 -0500 Subject: [PATCH] FS-10270: [mod_conference] Regression in personal canvas -- from: f1d8685566bab20beabe82e27af6f895868d9d2f #resolve --- src/mod/applications/mod_conference/conference_api.c | 2 ++ src/mod/applications/mod_conference/conference_video.c | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/mod/applications/mod_conference/conference_api.c b/src/mod/applications/mod_conference/conference_api.c index f13784bfbd..2df7aeaafc 100644 --- a/src/mod/applications/mod_conference/conference_api.c +++ b/src/mod/applications/mod_conference/conference_api.c @@ -1094,6 +1094,8 @@ switch_status_t conference_api_sub_vid_personal(conference_obj_t *conference, sw on = switch_true(argv[2]); if (on) { conference_utils_set_flag(conference, CFLAG_PERSONAL_CANVAS); + conference->video_layout_group = "grid"; + conference_utils_set_flag(conference, CFLAG_REFRESH_LAYOUT); } else { conference_utils_clear_flag(conference, CFLAG_PERSONAL_CANVAS); } diff --git a/src/mod/applications/mod_conference/conference_video.c b/src/mod/applications/mod_conference/conference_video.c index 605f9f9f9c..c8691c8429 100644 --- a/src/mod/applications/mod_conference/conference_video.c +++ b/src/mod/applications/mod_conference/conference_video.c @@ -698,7 +698,9 @@ void conference_video_layer_set_logo(conference_member_t *member, mcu_layer_t *l switch_img_free(&layer->logo_text_img); if (member->video_logo) { + switch_mutex_lock(member->flag_mutex); switch_img_copy(member->video_logo, &layer->logo_img); + switch_mutex_unlock(member->flag_mutex); if (layer->logo_img) { layer->logo_pos = member->logo_pos; @@ -719,7 +721,9 @@ void conference_member_set_logo(conference_member_t *member, const char *path) switch_img_position_t pos = POS_LEFT_TOP; switch_img_fit_t fit = SWITCH_FIT_SIZE; + switch_mutex_lock(member->flag_mutex); switch_img_free(&member->video_logo); + switch_mutex_unlock(member->flag_mutex); if (!path || !strcasecmp(path, "clear")) { return; @@ -3967,8 +3971,9 @@ switch_status_t conference_video_thread_callback(switch_core_session_t *session, if (conference_utils_test_flag(member->conference, CFLAG_VIDEO_MUXING)) { switch_image_t *img_copy = NULL; + int canvas_id = member->canvas_id; - if (frame->img && (member->video_layer_id > -1 || member->canvas) && + if (frame->img && (((member->video_layer_id > -1) && canvas_id > -1) || member->canvas) && conference_utils_member_test_flag(member, MFLAG_CAN_BE_SEEN) && switch_queue_size(member->video_queue) < member->conference->video_fps.fps * 2 && !member->conference->playing_video_file) {