ref: 50d6701e2a0352954026caf40383d10dad3a2be4
parent: a6595e6201064f34d1795be4e8d1412e426b233b
author: Mark Harris <[email protected]>
date: Wed Oct 7 05:22:57 EDT 2015
trivial_example: Fix error message Signed-off-by: Jean-Marc Valin <[email protected]>
--- a/doc/trivial_example.c
+++ b/doc/trivial_example.c
@@ -88,7 +88,7 @@
fin = fopen(inFile, "r");
if (fin==NULL)
{
- fprintf(stderr, "failed to open file: %s\n", strerror(errno));
+ fprintf(stderr, "failed to open input file: %s\n", strerror(errno));
return EXIT_FAILURE;
}
@@ -104,7 +104,7 @@
fout = fopen(outFile, "w");
if (fout==NULL)
{
- fprintf(stderr, "failed to open file: %s\n", strerror(errno));
+ fprintf(stderr, "failed to open output file: %s\n", strerror(errno));
return EXIT_FAILURE;
}
@@ -138,7 +138,7 @@
frame_size = opus_decode(decoder, cbits, nbBytes, out, MAX_FRAME_SIZE, 0);
if (frame_size<0)
{
- fprintf(stderr, "decoder failed: %s\n", opus_strerror(err));
+ fprintf(stderr, "decoder failed: %s\n", opus_strerror(frame_size));
return EXIT_FAILURE;
}