# HG changeset patch # User Mychaela Falconia # Date 1683874006 0 # Node ID 7c85a7a913f7ecff37ffecc3f93941188c9831b0 # Parent 5216e7fb1c9e5405d6a8a5d58358fba13d5071b7 rtp-gsmfr-dump: treat stream discontinuities as non-fatal diff -r 5216e7fb1c9e -r 7c85a7a913f7 rtp-gsmfr-dump.c --- a/rtp-gsmfr-dump.c Sun Apr 16 07:55:21 2023 +0000 +++ b/rtp-gsmfr-dump.c Fri May 12 06:46:46 2023 +0000 @@ -71,30 +71,24 @@ (rtp_hdr[10] << 8) | rtp_hdr[11]; if (stream_init_flag) { if (cur_ssrc != stream_ssrc) { - fprintf(stderr, + printf( "error in packet #%u: SSRC change from 0x%08X to 0x%08X\n", pkt_idx, stream_ssrc, cur_ssrc); - exit(1); - } - if (cur_seq != last_seq + 1 && - (cur_seq != 0 || last_seq != 0xFFFF)) { - fprintf(stderr, + } else if (cur_seq != last_seq + 1 && + (cur_seq != 0 || last_seq != 0xFFFF)) { + printf( "error in packet #%u: seq break from 0x%04X to 0x%04X\n", pkt_idx, last_seq, cur_seq); - exit(1); - } - if (cur_tstamp != last_tstamp + 160) { - fprintf(stderr, + } else if (cur_tstamp != last_tstamp + 160) { + printf( "error in packet #%u: timestamp break from 0x%08X to 0x%08X\n", pkt_idx, last_tstamp, cur_tstamp); - exit(1); } - } else { + } else stream_init_flag = 1; - stream_ssrc = cur_ssrc; - } last_seq = cur_seq; last_tstamp = cur_tstamp; + stream_ssrc = cur_ssrc; } static void