Fixes tandem-test.c

This commit is contained in:
Jean-Marc Valin 2011-03-18 15:47:53 -04:00
parent d0cb4ea301
commit c5f999097f
2 changed files with 3 additions and 3 deletions

View file

@ -2723,7 +2723,7 @@ const char *celt_strerror(int error)
static const char *error_strings[8] = {
"success",
"invalid argument",
"invalid mode",
"buffer too small",
"internal error",
"corrupted stream",
"request not implemented",

View file

@ -112,7 +112,7 @@ int async_tandem(int rate, int frame_size, int channels, int bitrate_min,
}
ret = celt_decode(dec, data, ret, pcm, frame_size);
if (ret != CELT_OK) {
if (ret < 0) {
fprintf(stderr, "Error: celt_decode returned %s\n", celt_strerror(ret));
}
}
@ -137,7 +137,7 @@ int async_tandem(int rate, int frame_size, int channels, int bitrate_min,
}
ret = celt_decode(dec, data, ret, pcm, frame_size);
if (ret != CELT_OK) {
if (ret < 0) {
fprintf(stderr, "Error: at %d bytes_per_frame celt_decode returned %s\n",
bytes_per_frame, celt_strerror(ret));
exit(1);