FreeCalypso > hg > gsm-codec-lib
changeset 212:0beafaa0623f
amr-cod-parse: handle Mode=-1 in NO_DATA frames
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Thu, 20 Apr 2023 02:23:35 +0000 |
parents | 78d1a6513393 |
children | 46a6e6b6841a |
files | amrconv/cod-parse.c amrconv/cod-read.c |
diffstat | 2 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/amrconv/cod-parse.c Thu Apr 20 01:30:46 2023 +0000 +++ b/amrconv/cod-parse.c Thu Apr 20 02:23:35 2023 +0000 @@ -53,6 +53,10 @@ type = input_bits[0]; mode = input_bits[245]; printf("#%u: Type=%u Mode=%u", frame_no, type, mode); + if (type == TX_NO_DATA) { + printf(" (NO_DATA)\n"); + continue; + } if (type > TX_NO_DATA || mode > MR122) { printf(" (unsupported)\n"); continue;
--- a/amrconv/cod-read.c Thu Apr 20 01:30:46 2023 +0000 +++ b/amrconv/cod-read.c Thu Apr 20 02:23:35 2023 +0000 @@ -34,7 +34,7 @@ bitvec[n] = sp[0]; upper = sp[1]; } - if (upper) { + if (upper && (sp[0] != 0xFF || sp[1] != 0xFF)) { fprintf(stderr, "error in %s: non-zero in what should be %s upper byte\n", filename_for_errs, big_endian ? "BE" : "LE");