FS-11413: [freeswitch-core,mod_conference,mod_local_stream] High memory footprint in some video situations #resolve

This commit is contained in:
Anthony Minessale authored and Andrey Volk committed 2018-11-28 01:19:35 +04:00
1 parent fffa393508
commit 4333f6813d
3 files changed
+19 -15

No files matched your search

+2
View File
@@ -2357,6 +2357,7 @@ static switch_status_t av_file_read_video(switch_file_handle_t *handle, switch_f
}
if (pop && status == SWITCH_STATUS_SUCCESS) {
switch_img_free(&context->last_img);
context->last_img = (switch_image_t *)pop;
switch_img_copy(context->last_img, &frame->img);
context->vid_ready = 1;
@@ -2467,6 +2468,7 @@ GCC_DIAG_ON(deprecated-declarations)
if (switch_micro_time_now() - mst->next_pts > -10000) {
frame->img = img;
} else {
switch_img_free(&context->last_img);
context->last_img = img;
return SWITCH_STATUS_BREAK;
}
@@ -248,7 +248,7 @@ switch_status_t conference_file_play(conference_obj_t *conference, char *file, u
flags = SWITCH_FILE_FLAG_READ | SWITCH_FILE_DATA_SHORT;
if (conference_utils_test_flag(conference, CFLAG_TRANSCODE_VIDEO)) {
if (conference_utils_test_flag(conference, CFLAG_TRANSCODE_VIDEO) && conference->conference_video_mode == CONF_VIDEO_MODE_MUX) {
flags |= SWITCH_FILE_FLAG_VIDEO;
}