FreeCalypso > hg > rtp-debug-utils
diff rtp-gsmfr-dump.c @ 5:7c85a7a913f7
rtp-gsmfr-dump: treat stream discontinuities as non-fatal
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Fri, 12 May 2023 06:46:46 +0000 |
parents | 50aa973a91ef |
children |
line wrap: on
line diff
--- 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