mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-06-07 05:29:22 +00:00
FS-4382 --resolve
This commit is contained in:
parent
da8885cc51
commit
9ca929218f
@ -712,7 +712,7 @@ typedef enum {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
RTP_BUG_GEN_ONE_GEN_ALL = (1 << 8)
|
RTP_BUG_GEN_ONE_GEN_ALL = (1 << 8),
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Some RTP endpoints (and by some we mean *cough* _SONUS_!) do not like it when the timestamps jump forward or backwards in time.
|
Some RTP endpoints (and by some we mean *cough* _SONUS_!) do not like it when the timestamps jump forward or backwards in time.
|
||||||
@ -726,6 +726,12 @@ typedef enum {
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
RTP_BUG_NEVER_CHANGE_SSRC_ON_MARKER = (1 << 9)
|
||||||
|
|
||||||
|
/*
|
||||||
|
By default FS will change the SSRC when the marker is set and it detects a timestamp reset.
|
||||||
|
If this setting is enabled it will NOT do this (old behaviour).
|
||||||
|
*/
|
||||||
|
|
||||||
} switch_rtp_bug_flag_t;
|
} switch_rtp_bug_flag_t;
|
||||||
|
|
||||||
|
@ -7022,6 +7022,14 @@ void sofia_glue_parse_rtp_bugs(switch_rtp_bug_flag_t *flag_pole, const char *str
|
|||||||
if (switch_stristr("~GEN_ONE_GEN_ALL", str)) {
|
if (switch_stristr("~GEN_ONE_GEN_ALL", str)) {
|
||||||
*flag_pole &= ~RTP_BUG_GEN_ONE_GEN_ALL;
|
*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("~NEVER_CHANGE_SSRC_ON_MARKER", str)) {
|
||||||
|
*flag_pole &= ~RTP_BUG_NEVER_CHANGE_SSRC_ON_MARKER;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
char *sofia_glue_gen_contact_str(sofia_profile_t *profile, sip_t const *sip, nua_handle_t *nh, sofia_dispatch_event_t *de, sofia_nat_parse_t *np)
|
char *sofia_glue_gen_contact_str(sofia_profile_t *profile, sip_t const *sip, nua_handle_t *nh, sofia_dispatch_event_t *de, sofia_nat_parse_t *np)
|
||||||
|
@ -4062,6 +4062,12 @@ static int rtp_common_write(switch_rtp_t *rtp_session,
|
|||||||
|
|
||||||
send_msg->header.m = (m && !(rtp_session->rtp_bugs & RTP_BUG_NEVER_SEND_MARKER)) ? 1 : 0;
|
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 ||
|
||||||
|
(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)));
|
||||||
|
}
|
||||||
|
|
||||||
memcpy(send_msg->body, data, datalen);
|
memcpy(send_msg->body, data, datalen);
|
||||||
bytes = datalen + rtp_header_len;
|
bytes = datalen + rtp_header_len;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user