CF_NOVIDEO,
CF_VIDEO_ECHO,
CF_SLA_INTERCEPT,
+ CF_VIDEO_BREAK,
/* WARNING: DO NOT ADD ANY FLAGS BELOW THIS LINE */
/* IF YOU ADD NEW ONES CHECK IF THEY SHOULD PERSIST OR ZERO THEM IN switch_core_session.c switch_core_session_request_xml() */
CF_FLAG_MAX
if (vh.up == 1) {
vh.up = -1;
- switch_core_session_kill_channel(session_a, SWITCH_SIG_BREAK);
- switch_core_session_kill_channel(session_b, SWITCH_SIG_BREAK);
}
+
+ switch_channel_set_flag(chan_a, CF_VIDEO_BREAK);
+ switch_channel_set_flag(chan_b, CF_VIDEO_BREAK);
+ switch_core_session_kill_channel(session_a, SWITCH_SIG_BREAK);
+ switch_core_session_kill_channel(session_b, SWITCH_SIG_BREAK);
+
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session_a), SWITCH_LOG_DEBUG, "Ending video thread.\n");
switch_thread_join(&st, vid_thread);
switch_channel_clear_flag(chan_a, CF_NOT_READY);
}
if (rtp_session->flags[SWITCH_RTP_FLAG_VIDEO]) {
- return;
+ int ret = 1;
+
+ if (rtp_session->session) {
+ switch_channel_t *channel = switch_core_session_get_channel(rtp_session->session);
+ if (switch_channel_test_flag(channel, CF_VIDEO_BREAK)) {
+ switch_channel_clear_flag(channel, CF_VIDEO_BREAK);
+ ret = 0;
+ }
+ }
+
+ if (ret) return;
}
switch_mutex_lock(rtp_session->flag_mutex);
if (rtp_session->dtmf_data.out_digit_dur > 0) {
return_cng_frame();
}
+
+ if (rtp_session->flags[SWITCH_RTP_FLAG_VIDEO] && rtp_session->flags[SWITCH_RTP_FLAG_BREAK]) {
+ switch_rtp_clear_flag(rtp_session, SWITCH_RTP_FLAG_BREAK);
+ bytes = 0;
+ return_cng_frame();
+ }
+
}
if (poll_status == SWITCH_STATUS_SUCCESS) {