Improved error handling, and implemented celt_strerror()

This commit is contained in:
Jean-Marc Valin 2009-10-16 07:30:14 -04:00
parent 80ed147663
commit ece94a0475
4 changed files with 56 additions and 3 deletions

View file

@ -108,10 +108,16 @@ int main(int argc, char *argv[])
enc = celt_encoder_create(mode, channels, &err);
if (err != 0)
{
fprintf(stderr, "Failed to create the encoder: %s\n", celt_strerror(err));
return 1;
}
dec = celt_decoder_create(mode, channels, &err);
if (err != 0)
{
fprintf(stderr, "Failed to create the decoder: %s\n", celt_strerror(err));
return 1;
}
if (argc>7)
{