From ca4ac85f6de99fac6773f79885c8c710ed4b1c2c Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Fri, 18 Sep 2015 10:06:41 -0500 Subject: [PATCH] FS-8130 don't skip delta on video unless it was less than 1 second worth to prevent locking up chrome --- src/switch_rtp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/switch_rtp.c b/src/switch_rtp.c index 46ddbb7964..ad2e934cf3 100644 --- a/src/switch_rtp.c +++ b/src/switch_rtp.c @@ -7050,7 +7050,10 @@ static int rtp_common_write(switch_rtp_t *rtp_session, if (switch_rtp_test_flag(rtp_session, SWITCH_RTP_FLAG_GEN_TS_DELTA)) { int32_t delta = (int32_t) (ntohl(send_msg->header.ts) - rtp_session->ts_norm.last_frame); - rtp_session->ts_norm.delta = delta; + if (switch_rtp_test_flag(rtp_session, SWITCH_RTP_FLAG_VIDEO) && delta > 0 && delta < 90000) { + rtp_session->ts_norm.delta = delta; + } + rtp_session->ts_norm.ts += rtp_session->ts_norm.delta; } else { switch_core_timer_sync(&rtp_session->timer);