This commit is contained in:
Anthony Minessale 2017-02-07 14:35:24 -06:00
parent c14cadf163
commit 189786d49b
1 changed files with 12 additions and 10 deletions

View File

@ -7914,19 +7914,21 @@ static int rtp_common_write(switch_rtp_t *rtp_session,
if (rtp_session->flags[SWITCH_RTP_FLAG_NACK]) {
switch_channel_t *channel = switch_core_session_get_channel(rtp_session->session);
int nack_size = 100;
const char *var;
if ((var = switch_channel_get_variable(channel, "rtp_nack_buffer_size"))) {
int tmp = atoi(var);
if (tmp > 0 && tmp < 500) {
nack_size = tmp;
}
}
if (!rtp_session->vbw) {
int nack_size = 100;
const char *var;
if ((var = switch_channel_get_variable(channel, "rtp_nack_buffer_size"))) {
int tmp = atoi(var);
if (tmp > 0 && tmp < 500) {
nack_size = tmp;
}
}
switch_jb_create(&rtp_session->vbw, SJB_VIDEO, nack_size, nack_size, rtp_session->pool);
if (rtp_session->vbw) {
switch_jb_set_flag(rtp_session->vbw, SJB_QUEUE_ONLY);
//switch_jb_debug_level(rtp_session->vbw, 10);