FS-10091: [mod_conference] Conference play file with full-screen=true has side effect on member video -- - manual cherry pick

This commit is contained in:
Anthony Minessale 2017-07-20 17:25:08 -05:00
parent 1a7c04da88
commit 35542d33ee
2 changed files with 18 additions and 7 deletions

View File

@ -94,8 +94,11 @@ switch_status_t conference_file_close(conference_obj_t *conference, conference_f
if (conference->playing_video_file) {
conference->canvases[node->canvas_id]->send_keyframe = 1;
conference->canvases[node->canvas_id]->play_file = 0;
conference->playing_video_file = 0;
}
return switch_core_file_close(&node->fh);
}

View File

@ -1949,7 +1949,9 @@ void conference_video_fnode_check(conference_file_node_t *fnode, int canvas_id)
}
if (full_screen) {
canvas->play_file = 1;
if (canvas->play_file == 0) {
canvas->play_file = 1;
}
canvas->conference->playing_video_file = 1;
} else {
conference_video_canvas_set_fnode_layer(canvas, fnode, -1);
@ -3244,17 +3246,23 @@ void *SWITCH_THREAD_FUNC conference_video_muxing_thread_run(switch_thread_t *thr
if (conference->playing_video_file) {
if (switch_core_file_read_video(&conference->fnode->fh, &write_frame, SVR_FLUSH) == SWITCH_STATUS_SUCCESS) {
switch_img_free(&file_img);
switch_image_t *tmp = NULL;
if (canvas->play_file) {
if (canvas->play_file == 1) {
canvas->send_keyframe = 1;
canvas->play_file = 0;
canvas->play_file = -1;
}
switch_img_free(&file_img);
switch_img_fit(&write_frame.img, canvas->img->d_w, canvas->img->d_h, SWITCH_FIT_SIZE);
file_img = write_img = write_frame.img;
switch_img_letterbox(write_frame.img, &tmp, canvas->img->d_w, canvas->img->d_h, "#000000");
if (tmp) {
switch_img_free(&write_frame.img);
file_img = write_img = write_frame.img = tmp;
} else {
file_img = write_img = write_frame.img;
}
//switch_core_timer_sync(&canvas->timer);
timestamp = canvas->timer.samplecount;
} else if (file_img) {