*/
- RTP_BUG_NEVER_CHANGE_SSRC_ON_MARKER = (1 << 9)
+ RTP_BUG_CHANGE_SSRC_ON_MARKER = (1 << 9)
/*
By default FS will change the SSRC when the marker is set and it detects a timestamp reset.
*flag_pole &= ~RTP_BUG_GEN_ONE_GEN_ALL;
}
- if (switch_stristr("NEVER_CHANGE_SSRC_ON_MARKER", str)) {
- *flag_pole |= RTP_BUG_NEVER_CHANGE_SSRC_ON_MARKER;
+ if (switch_stristr("CHANGE_SSRC_ON_MARKER", str)) {
+ *flag_pole |= RTP_BUG_CHANGE_SSRC_ON_MARKER;
}
- if (switch_stristr("~NEVER_CHANGE_SSRC_ON_MARKER", str)) {
- *flag_pole &= ~RTP_BUG_NEVER_CHANGE_SSRC_ON_MARKER;
+ if (switch_stristr("~CHANGE_SSRC_ON_MARKER", str)) {
+ *flag_pole &= ~RTP_BUG_CHANGE_SSRC_ON_MARKER;
}
}
send_msg->header.m = (m && !(rtp_session->rtp_bugs & RTP_BUG_NEVER_SEND_MARKER)) ? 1 : 0;
/* If the marker was set, and the timestamp seems to have started over - set a new SSRC, to indicate this is a new stream */
- if (send_msg->header.m && !(rtp_session->rtp_bugs & RTP_BUG_NEVER_CHANGE_SSRC_ON_MARKER) && (rtp_session->last_write_ts == RTP_TS_RESET ||
+ if (send_msg->header.m && switch_test_flag(rtp_session, SWITCH_RTP_FLAG_SECURE_SEND) &&
+ (rtp_session->rtp_bugs & RTP_BUG_CHANGE_SSRC_ON_MARKER) && (rtp_session->last_write_ts == RTP_TS_RESET ||
(rtp_session->ts <= rtp_session->last_write_ts && rtp_session->last_write_ts > 0))) {
switch_rtp_set_ssrc(rtp_session, (uint32_t) ((intptr_t) rtp_session + (uint32_t) switch_epoch_time_now(NULL)));
}