# HG changeset patch # User Mychaela Falconia # Date 1681957415 0 # Node ID 0beafaa0623f9d7abc5cc6362fa5f36803f3ced4 # Parent 78d1a6513393dd1bc055a4bf3d7a386c35f9290e amr-cod-parse: handle Mode=-1 in NO_DATA frames diff -r 78d1a6513393 -r 0beafaa0623f amrconv/cod-parse.c --- 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; diff -r 78d1a6513393 -r 0beafaa0623f amrconv/cod-read.c --- 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");