summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ivorbisfile_example.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/ivorbisfile_example.c b/ivorbisfile_example.c
index c99cfd2..7b0cf10 100644
--- a/ivorbisfile_example.c
+++ b/ivorbisfile_example.c
@@ -69,7 +69,12 @@ int main(){
/* EOF */
eof=1;
} else if (ret < 0) {
- /* error in the stream. Not a problem, just reporting it in
+ if(ret==OV_EBADLINK){
+ fprintf(stderr,"Corrupt bitstream section! Exiting.\n");
+ exit(1);
+ }
+
+ /* some other error in the stream. Not a problem, just reporting it in
case we (the app) cares. In this case, we don't. */
} else {
/* we don't bother dealing with sample rate changes, etc, but