FreeCalypso > hg > gsm-codec-lib
comparison amrtest/tseq-enc.c @ 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 |
comparison
equal
deleted
inserted
replaced
422:1ceda5586d01 | 423:cf90077b753c |
---|---|
25 int cc; | 25 int cc; |
26 | 26 |
27 cc = fread(pcm, 2, 160, inf); | 27 cc = fread(pcm, 2, 160, inf); |
28 if (cc == 0) | 28 if (cc == 0) |
29 return 0; | 29 return 0; |
30 if (cc != 160) { | 30 if (cc < 160) { |
31 fprintf(stderr, "error: short read from %s\n", | 31 fprintf(stderr, "warning: incomplete frame at the end of %s\n", |
32 filename_for_errs); | 32 filename_for_errs); |
33 exit(1); | 33 return 0; |
34 } | 34 } |
35 return 1; | 35 return 1; |
36 } | 36 } |
37 | 37 |
38 main(argc, argv) | 38 main(argc, argv) |