SWITCH_RTP_FLAG_VIDEO,
SWITCH_RTP_FLAG_ENABLE_RTCP,
SWITCH_RTP_FLAG_RTCP_MUX,
+ SWITCH_RTP_FLAG_KILL_JB,
SWITCH_RTP_FLAG_INVALID
} switch_rtp_flag_t;
return SWITCH_STATUS_FALSE;
}
- READ_INC(rtp_session);
- stfu_n_destroy(&rtp_session->jb);
- READ_DEC(rtp_session);
+ rtp_session->flags[SWITCH_RTP_FLAG_KILL_JB]++;
return SWITCH_STATUS_SUCCESS;
}
rtp_session->autoadj_window = 20;
rtp_session->autoadj_tally = 0;
rtp_flush_read_buffer(rtp_session, SWITCH_RTP_FLUSH_ONCE);
+ if (rtp_session->jb) {
+ stfu_n_reset(rtp_session->jb);
+ }
} else if (flag == SWITCH_RTP_FLAG_NOBLOCK && rtp_session->sock_input) {
switch_socket_opt_set(rtp_session->sock_input, SWITCH_SO_NONBLOCK, TRUE);
}
switch_swap_linear((int16_t *)RTP_BODY(rtp_session), (int) *bytes - rtp_header_len);
}
+ if (rtp_session->flags[SWITCH_RTP_FLAG_KILL_JB]) {
+ rtp_session->flags[SWITCH_RTP_FLAG_KILL_JB] = 0;
+ if (rtp_session->jb) {
+ stfu_n_destroy(&rtp_session->jb);
+ }
+ }
+
+
if (rtp_session->jb && !rtp_session->pause_jb && rtp_session->recv_msg.header.version == 2 && *bytes) {
if (rtp_session->recv_msg.header.m && rtp_session->recv_msg.header.pt != rtp_session->recv_te &&
!rtp_session->flags[SWITCH_RTP_FLAG_VIDEO] && !(rtp_session->rtp_bugs & RTP_BUG_IGNORE_MARK_BIT)) {