]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-8130 fix regression causing seg
authorAnthony Minessale <anthm@freeswitch.org>
Fri, 18 Sep 2015 02:11:04 +0000 (21:11 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Fri, 18 Sep 2015 02:11:04 +0000 (21:11 -0500)
src/switch_jitterbuffer.c
src/switch_rtp.c

index e9e31793d6448f776c1df0e4777505b425df5061..ec0123d2b5cfdb8bd2e96ae940c026b37315d6b4 100644 (file)
@@ -376,7 +376,7 @@ static inline uint32_t jb_find_lowest_ts(switch_jb_t *jb)
        return lowest ? lowest->packet.header.ts : 0;
 }
 
-
+#if 0
 static inline switch_jb_node_t *jb_find_highest_node(switch_jb_t *jb)
 {
        switch_jb_node_t *np, *highest = NULL;
@@ -400,6 +400,7 @@ static inline uint32_t jb_find_highest_ts(switch_jb_t *jb)
 
        return highest ? highest->packet.header.ts : 0;
 }
+#endif
 
 static inline void jb_hit(switch_jb_t *jb)
 {
@@ -525,6 +526,7 @@ static inline void drop_oldest_frame(switch_jb_t *jb)
        jb_debug(jb, 1, "Dropping oldest frame ts:%u\n", ntohl(ts));
 }
 
+#if 0
 static inline void drop_newest_frame(switch_jb_t *jb)
 {
        uint32_t ts = jb_find_highest_ts(jb);
@@ -532,6 +534,7 @@ static inline void drop_newest_frame(switch_jb_t *jb)
        drop_ts(jb, ts);
        jb_debug(jb, 1, "Dropping highest frame ts:%u\n", ntohl(ts));
 }
+#endif
 
 static inline void add_node(switch_jb_t *jb, switch_rtp_packet_t *packet, switch_size_t len)
 {
index fda95be2f5504eba429e2124c61710aaf2236351..44aac5b134306a24091f43b4e520f2eafe2505f7 100644 (file)
@@ -1902,7 +1902,7 @@ static int check_rtcp_and_ice(switch_rtp_t *rtp_session)
        int rtcp_ok = 0, rtcp_fb = 0;
        switch_time_t now = switch_micro_time_now();
        int rate = 0, nack_ttl = 0;
-       uint32_t cur_nack[MAX_NACK - 1];
+       uint32_t cur_nack[MAX_NACK];
 
        if (rtp_session->flags[SWITCH_RTP_FLAG_AUTO_CNG] && rtp_session->send_msg.header.ts && rtp_session->cng_pt != INVALID_PT &&
                (rtp_session->timer.samplecount - rtp_session->last_write_samplecount >= rtp_session->samples_per_interval * 60)) {
@@ -2064,9 +2064,9 @@ static int check_rtcp_and_ice(switch_rtp_t *rtp_session)
                                                                          ntohs(*nack & 0xFFFF));
                                
                                        rtcp_bytes += sizeof(switch_rtcp_ext_hdr_t) + sizeof(cur_nack[n]);
+                                       cur_nack[n] = 0;
                                }
 
-                               cur_nack[n] = 0;
                                nack_ttl = 0;
                        }