mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-24 13:12:03 +00:00
FS-8053 addtl touchups
This commit is contained in:
+5
-7
@@ -6999,8 +6999,8 @@ static int rtp_common_write(switch_rtp_t *rtp_session,
|
||||
}
|
||||
}
|
||||
|
||||
/* TMP DISABLE DFF */
|
||||
if (switch_rtp_test_flag(rtp_session, SWITCH_RTP_FLAG_VIDEO)) {
|
||||
|
||||
if (switch_rtp_test_flag(rtp_session, SWITCH_RTP_FLAG_GEN_TS_DELTA) || switch_rtp_test_flag(rtp_session, SWITCH_RTP_FLAG_VIDEO)) {
|
||||
/* Normalize the timestamps to our own base by generating a made up starting point then adding the measured deltas to that base
|
||||
so if the timestamps and ssrc of the source change, it will not break the other end's jitter bufffer / decoder etc *cough* CHROME *cough*
|
||||
*/
|
||||
@@ -7010,7 +7010,7 @@ static int rtp_common_write(switch_rtp_t *rtp_session,
|
||||
}
|
||||
|
||||
if (!rtp_session->ts_norm.last_ssrc || send_msg->header.ssrc != rtp_session->ts_norm.last_ssrc) {
|
||||
//#define USE_DELTA
|
||||
#define USE_DELTA
|
||||
#ifdef USE_DELTA
|
||||
if (rtp_session->ts_norm.last_ssrc) {
|
||||
rtp_session->ts_norm.delta_ct = 1;
|
||||
@@ -7028,10 +7028,8 @@ static int rtp_common_write(switch_rtp_t *rtp_session,
|
||||
if (ntohl(send_msg->header.ts) != rtp_session->ts_norm.last_frame) {
|
||||
#ifdef USE_DELTA
|
||||
int32_t delta = (int32_t) (ntohl(send_msg->header.ts) - rtp_session->ts_norm.last_frame);
|
||||
if (delta > 0 && delta < 90000) {
|
||||
rtp_session->ts_norm.delta = delta;
|
||||
}
|
||||
//printf("WTF %d\n", rtp_session->ts_norm.delta);
|
||||
|
||||
rtp_session->ts_norm.delta = delta;
|
||||
rtp_session->ts_norm.ts += rtp_session->ts_norm.delta;
|
||||
#else
|
||||
switch_core_timer_sync(&rtp_session->timer);
|
||||
|
||||
Reference in New Issue
Block a user