changeset 423:cf90077b753c

twamr-tseq-enc: treat dribble input as non-fatal 3GPP VAD2 test sequences dt22.inp and dt23.inp have incomplete frames at the end, hence we need to ignore that dribble in a non-fatal manner in order to pass all tests.
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 07 May 2024 07:20:29 +0000
parents 1ceda5586d01
children 98355251975d
files amrtest/tseq-enc.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/amrtest/tseq-enc.c	Tue May 07 06:27:20 2024 +0000
+++ b/amrtest/tseq-enc.c	Tue May 07 07:20:29 2024 +0000
@@ -27,10 +27,10 @@
 	cc = fread(pcm, 2, 160, inf);
 	if (cc == 0)
 		return 0;
-	if (cc != 160) {
-		fprintf(stderr, "error: short read from %s\n",
+	if (cc < 160) {
+		fprintf(stderr, "warning: incomplete frame at the end of %s\n",
 			filename_for_errs);
-		exit(1);
+		return 0;
 	}
 	return 1;
 }