FS-10472: [mod_conference] Crash due to hangup race in conference personal canvas mode -- Regression fixed with playing files
This commit is contained in:
parent
a205bb6358
commit
58dffd3759
|
@ -1428,7 +1428,6 @@ void conference_video_init_canvas_layers(conference_obj_t *conference, mcu_canva
|
|||
|
||||
switch_thread_rwlock_wrlock(canvas->video_rwlock);
|
||||
switch_mutex_lock(canvas->mutex);
|
||||
canvas->layout_floor_id = -1;
|
||||
|
||||
for (i = 0; i < MCU_MAX_LAYERS; i++) {
|
||||
mcu_layer_t *layer = &canvas->layers[i];
|
||||
|
@ -1448,6 +1447,8 @@ void conference_video_init_canvas_layers(conference_obj_t *conference, mcu_canva
|
|||
return;
|
||||
}
|
||||
|
||||
canvas->layout_floor_id = -1;
|
||||
|
||||
if (!vlayout) {
|
||||
vlayout = canvas->new_vlayout;
|
||||
canvas->new_vlayout = NULL;
|
||||
|
@ -3664,18 +3665,20 @@ void *SWITCH_THREAD_FUNC conference_video_muxing_thread_run(switch_thread_t *thr
|
|||
|
||||
for (j = 0; j < file_count; j++) {
|
||||
switch_image_t *img = file_imgs[j];
|
||||
layer = NULL;
|
||||
|
||||
if (j == 0 && imember->canvas->layout_floor_id > -1) {
|
||||
layer = &imember->canvas->layers[imember->canvas->layout_floor_id];
|
||||
conference_video_scale_and_patch(layer, img, SWITCH_FALSE);
|
||||
} else if (i < imember->canvas->total_layers) {
|
||||
layer = &imember->canvas->layers[i++];
|
||||
conference_video_scale_and_patch(layer, img, SWITCH_FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
if (imember->session) {
|
||||
switch_core_session_rwunlock(imember->session);
|
||||
if (layer) {
|
||||
switch_img_free(&layer->banner_img);
|
||||
switch_img_free(&layer->logo_img);
|
||||
layer->member_id = -1;
|
||||
conference_video_scale_and_patch(layer, img, SWITCH_FALSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue