ts_diff = abs((int)((int64_t)ntohl(node->packet.header.ts) - (int64_t)ntohl(jb->highest_wrote_ts)));
}
- if (((seq_diff >= jb->max_frame_len) || (ts_diff > (900000 * 5)))) {
+ if (((seq_diff >= 100) || (ts_diff > (900000 * 5)))) {
jb_debug(jb, 2, "CHANGE DETECTED, PUNT %u\n", abs(((int)ntohs(packet->header.seq) - ntohs(jb->highest_wrote_seq))));
switch_jb_reset(jb);
}
goto done;
}
- if (rtp_session->flags[SWITCH_RTP_FLAG_VIDEO]) {
- switch_socket_opt_set(new_sock, SWITCH_SO_RCVBUF, 1572864);
- switch_socket_opt_set(new_sock, SWITCH_SO_SNDBUF, 1572864);
- }
+ //if (rtp_session->flags[SWITCH_RTP_FLAG_VIDEO]) {
+ //switch_socket_opt_set(new_sock, SWITCH_SO_RCVBUF, 1572864);
+ //switch_socket_opt_set(new_sock, SWITCH_SO_SNDBUF, 1572864);
+ //}
if (switch_socket_bind(new_sock, rtp_session->local_addr) != SWITCH_STATUS_SUCCESS) {
char *em = switch_core_sprintf(rtp_session->pool, "Bind Error! %s:%d", host, port);
int hot_socket = 0;
int read_loops = 0;
int slept = 0;
+ switch_bool_t got_jb = SWITCH_FALSE;
if (!switch_rtp_ready(rtp_session)) {
return -1;
}
+ if (rtp_session->flags[SWITCH_RTP_FLAG_VIDEO]) {
+ got_jb = (rtp_session->vb && switch_jb_poll(rtp_session->vb));
+ } else {
+ got_jb = SWITCH_TRUE;
+ }
- if (poll_status == SWITCH_STATUS_SUCCESS || (rtp_session->vb && switch_jb_poll(rtp_session->vb))) {
+ if (poll_status == SWITCH_STATUS_SUCCESS || got_jb) {
got_rtp_poll = 1;
read_pretriggered = 0;
} else {
- status = read_rtp_packet(rtp_session, &bytes, flags, pmapP, poll_status, SWITCH_TRUE);
+
+ status = read_rtp_packet(rtp_session, &bytes, flags, pmapP, poll_status, got_jb);
if (status == SWITCH_STATUS_GENERR) {
ret = -1;