Don't crash on successful corrupt file rejection due to being too lazy
authorMonty <xiphmont@xiph.org>
Tue, 18 Mar 2008 15:43:35 +0000 (15:43 +0000)
committerMonty <xiphmont@xiph.org>
Tue, 18 Mar 2008 15:43:35 +0000 (15:43 +0000)
to check return vals.

svn path=/trunk/vorbis/; revision=14599

examples/decoder_example.c

index dfb142f..2ca4205 100644 (file)
@@ -163,7 +163,11 @@ int main(){
              fprintf(stderr,"Corrupt secondary header.  Exiting.\n");
              exit(1);
            }
-           vorbis_synthesis_headerin(&vi,&vc,&op);
+           result=vorbis_synthesis_headerin(&vi,&vc,&op);
+           if(result<0){
+             fprintf(stderr,"Corrupt secondary header.  Exiting.\n");
+             exit(1);
+           }
            i++;
          }
        }