diff --git a/src/switch_core_media.c b/src/switch_core_media.c index cf4e25dd1a..46be6fe0c4 100644 --- a/src/switch_core_media.c +++ b/src/switch_core_media.c @@ -4967,7 +4967,7 @@ static void *SWITCH_THREAD_FUNC video_helper_thread(switch_thread_t *thread, voi //if (!smh->video_write_fh || !switch_channel_test_flag(channel, CF_VIDEO_READY)) { status = switch_core_session_read_video_frame(session, &read_frame, SWITCH_IO_FLAG_NONE, 0); - + if (!SWITCH_READ_ACCEPTABLE(status)) { switch_cond_next(); continue; @@ -5014,7 +5014,7 @@ static void *SWITCH_THREAD_FUNC video_helper_thread(switch_thread_t *thread, voi } else if (switch_channel_test_flag(channel, CF_VIDEO_DECODED_READ)) { send_blank = 1; } - + send_blank = 1; if ((send_blank || switch_channel_test_flag(channel, CF_VIDEO_BLANK)) && !session->video_read_callback && !switch_channel_test_flag(session->channel, CF_BRIDGED)) { fr.img = blank_img; diff --git a/src/switch_core_session.c b/src/switch_core_session.c index 5c6fb8ec06..5c0eef4a4d 100644 --- a/src/switch_core_session.c +++ b/src/switch_core_session.c @@ -2683,6 +2683,7 @@ SWITCH_DECLARE(void) switch_core_session_video_reset(switch_core_session_t *sess //switch_channel_clear_flag(session->channel, CF_VIDEO_DECODED_READ); switch_channel_clear_flag(session->channel, CF_VIDEO_DEBUG_READ); switch_channel_clear_flag(session->channel, CF_VIDEO_DEBUG_WRITE); + switch_channel_clear_flag(session->channel, CF_VIDEO_BLANK); switch_core_session_request_video_refresh(session); } diff --git a/src/switch_ivr_bridge.c b/src/switch_ivr_bridge.c index a6d086ec68..988a93081f 100644 --- a/src/switch_ivr_bridge.c +++ b/src/switch_ivr_bridge.c @@ -478,6 +478,13 @@ static void *audio_bridge_thread(switch_thread_t *thread, void *obj) vh.session_a = session_a; vh.session_b = session_b; launch_video(&vh); + } else { + if (switch_channel_test_flag(chan_a, CF_VIDEO)) { + switch_channel_set_flag(chan_a, CF_VIDEO_BLANK); + } + if (switch_channel_test_flag(chan_b, CF_VIDEO)) { + switch_channel_set_flag(chan_b, CF_VIDEO_BLANK); + } } #endif @@ -751,6 +758,8 @@ static void *audio_bridge_thread(switch_thread_t *thread, void *obj) switch_channel_set_flag(chan_b, CF_INTERCEPT); } + switch_channel_clear_flag(chan_a, CF_VIDEO_BLANK); + switch_channel_clear_flag(chan_b, CF_VIDEO_BLANK); switch_core_session_kill_channel(session_b, SWITCH_SIG_BREAK); data->done = 1; diff --git a/src/switch_ivr_play_say.c b/src/switch_ivr_play_say.c index 76c666b6e2..506597b263 100644 --- a/src/switch_ivr_play_say.c +++ b/src/switch_ivr_play_say.c @@ -550,6 +550,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_record_file(switch_core_session_t *se if (switch_core_file_has_video(fh)) { switch_channel_set_flag(channel, CF_VIDEO_ECHO); switch_core_media_set_video_file(session, fh, SWITCH_RW_READ); + } else if (switch_channel_test_flag(channel, CF_VIDEO)) { + switch_channel_set_flag(channel, CF_VIDEO_BLANK); } if (sample_start > 0) { @@ -624,6 +626,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_record_file(switch_core_session_t *se switch_channel_clear_flag_recursive(channel, CF_VIDEO_DECODED_READ); switch_core_media_set_video_file(session, NULL, SWITCH_RW_READ); } + switch_channel_clear_flag(channel, CF_VIDEO_BLANK); switch_core_file_close(fh); switch_core_session_reset(session, SWITCH_TRUE, SWITCH_TRUE); @@ -801,6 +804,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_record_file(switch_core_session_t *se switch_channel_clear_flag_recursive(channel, CF_VIDEO_DECODED_READ); switch_core_media_set_video_file(session, NULL, SWITCH_RW_READ); } + switch_channel_clear_flag(channel, CF_VIDEO_BLANK); switch_core_file_close(fh);