]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-9654: Fix RTP packet drops
authorJosh Allmann <joshua.allmann@gmail.com>
Fri, 28 Oct 2016 14:41:19 +0000 (10:41 -0400)
committerJosh Allmann <joshua.allmann@gmail.com>
Fri, 28 Oct 2016 15:02:01 +0000 (11:02 -0400)
There was issue with certain endpoints that would lead to dropping
nearly every other RTP packet from the callee.

The scenario is as follows: the caller (bridged through FreeSWITCH)
offers codecs A and B with payload types X and Y, respectively.
The callee answers with codec B and payload type X.

The fix is to use the sender's expected payload type when checking
against the received RTP packet, rather than the receiver's.

src/switch_rtp.c

index 5737434787ea24839dd1399d0eda3904501ef681..1acd1d5b0846fa5147094f0033e5f74e43407c5b 100644 (file)
@@ -6841,7 +6841,7 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_
                                                continue;
                                        }
 
-                                       if (rtp_session->last_rtp_hdr.pt == pmap->pt) {
+                                       if (rtp_session->last_rtp_hdr.pt == pmap->recv_pt) {
                                                accept_packet = 1;
                                                if (pmapP) {
                                                        *pmapP = pmap;