]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-4382 reverse this so you have to enable instead of disable, this patch has been...
authorAnthony Minessale <anthm@freeswitch.org>
Thu, 19 Jul 2012 03:01:41 +0000 (22:01 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Thu, 19 Jul 2012 03:01:41 +0000 (22:01 -0500)
src/include/switch_types.h
src/mod/endpoints/mod_sofia/sofia_glue.c
src/switch_rtp.c

index 86c7ab2f06c221d0ef7158be7c837df835d9ce8b..20ee478bf5756761d24d6a86a04e9c223b51af3f 100644 (file)
@@ -727,7 +727,7 @@ typedef enum {
 
         */
 
-       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.
index 78beb7362499d2a3d6c07c322cf5a87d740786db..878bf73a7fdc6f7140ab899ba52664c0a89a915b 100644 (file)
@@ -7021,12 +7021,12 @@ void sofia_glue_parse_rtp_bugs(switch_rtp_bug_flag_t *flag_pole, const char *str
                *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;
        }
 }
 
index 16b5d6d38c31033ad6731448d24cae76089fda29..f6bc3647733b9ef60181d4ff0443180136e49590 100644 (file)
@@ -4130,7 +4130,8 @@ 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;
 
                /* 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)));
                }