From f862c41c40769f822db01048aa4bc4e21c79e2f5 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Thu, 29 Oct 2015 10:28:38 -0500 Subject: [PATCH] update --- src/mod/applications/mod_conference/conference_video.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/mod/applications/mod_conference/conference_video.c b/src/mod/applications/mod_conference/conference_video.c index 7bdf4611bc..58ae631265 100644 --- a/src/mod/applications/mod_conference/conference_video.c +++ b/src/mod/applications/mod_conference/conference_video.c @@ -3350,10 +3350,14 @@ 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; - if (frame->img && (member->video_layer_id > -1 || member->canvas) && conference_utils_member_test_flag(member, MFLAG_CAN_BE_SEEN) && + if (frame->img && (member->video_layer_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) { switch_img_copy(frame->img, &img_copy); - switch_queue_push(member->video_queue, img_copy); + if (switch_queue_trypush(member->video_queue, img_copy) != SWITCH_STATUS_SUCCESS) { + switch_img_free(&img_copy); + } } switch_thread_rwlock_unlock(member->conference->rwlock);