diff pcap/rtp-gsmfr-extr.c @ 207:10f11a2d4042

pcap utils: fix bug in the case of RTP timestamp 16-bit rollover
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 17 Feb 2023 19:56:45 +0000
parents 851ca64e38e9
children
line wrap: on
line diff
--- a/pcap/rtp-gsmfr-extr.c	Wed Jan 04 07:53:16 2023 +0000
+++ b/pcap/rtp-gsmfr-extr.c	Fri Feb 17 19:56:45 2023 +0000
@@ -70,7 +70,8 @@
 				pkt_idx, stream_ssrc, cur_ssrc);
 			exit(1);
 		}
-		if (cur_seq != last_seq + 1) {
+		if (cur_seq != last_seq + 1 &&
+		    (cur_seq != 0 || last_seq != 0xFFFF)) {
 			fprintf(stderr,
 		"error in packet #%u: seq break from 0x%04X to 0x%04X\n",
 				pkt_idx, last_seq, cur_seq);