From 550d85210c0e1e3d71ce1217f07d1e196970b62d Mon Sep 17 00:00:00 2001 From: Josh Allmann Date: Thu, 10 Nov 2016 01:58:56 -0500 Subject: [PATCH] FS-9725: Disable blank img with core_video_blank_image=false. --- src/switch_core_media.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/switch_core_media.c b/src/switch_core_media.c index 41f9c36d50..d57a9b0e0a 100644 --- a/src/switch_core_media.c +++ b/src/switch_core_media.c @@ -6303,6 +6303,7 @@ static void *SWITCH_THREAD_FUNC video_helper_thread(switch_thread_t *thread, voi switch_rtp_engine_t *v_engine = NULL; const char *var; int buflen = SWITCH_RTP_MAX_BUF_LEN; + int blank_enabled = 1; if (!(smh = session->media_handle)) { return NULL; @@ -6311,7 +6312,11 @@ static void *SWITCH_THREAD_FUNC video_helper_thread(switch_thread_t *thread, voi switch_core_autobind_cpu(); if ((var = switch_channel_get_variable(session->channel, "core_video_blank_image"))) { - blank_img = switch_img_read_png(var, SWITCH_IMG_FMT_I420); + if (switch_false(var)) { + blank_enabled = 0; + } else { + blank_img = switch_img_read_png(var, SWITCH_IMG_FMT_I420); + } } if (!blank_img) { @@ -6406,7 +6411,7 @@ static void *SWITCH_THREAD_FUNC video_helper_thread(switch_thread_t *thread, voi vloops++; - send_blank = 1; + send_blank = blank_enabled; if (switch_channel_test_flag(channel, CF_VIDEO_READY) && !switch_test_flag(read_frame, SFF_CNG)) { switch_mutex_lock(mh->file_read_mutex);