mp3decoder compiled by our research compiler produces the same output that I get...
[IRC.git] / Robust / src / Tests / ssJava / mp3decoder / Header.java
index 6da0e4ddbaca0e031faaf8f0c656fd310ef02d19..10c7d343ea614aac6fe7978634894de011175845 100644 (file)
@@ -142,14 +142,15 @@ public final class Header {
   /**
    * Read a 32-bit header from the bitstream.
    */
-  void read_header(Bitstream stream, Crc16[] crcp) throws BitstreamException {
-    System.out.print("READ_HEADER_ST");
+  int read_header(Bitstream stream, Crc16[] crcp) throws BitstreamException {
     int headerstring;
     int channel_bitrate;
     boolean sync = false;
     do {
-      System.out.println("DO!");
       headerstring = stream.syncHeader(syncmode);
+      if(headerstring==-1){
+        return -1;
+      }
       _headerstring = headerstring; // E.B
       if (syncmode == Bitstream.INITIAL_SYNC) {
         h_version = ((headerstring >>> 19) & 1);
@@ -218,7 +219,6 @@ public final class Header {
       } else {
         stream.unreadFrame();
       }
-      System.out.println("do");
     } while (!sync);
     stream.parse_frame();
     if (h_protection_bit == 0) {
@@ -239,7 +239,7 @@ public final class Header {
        * offset[cf-1] + h_padding_bit; } else { offset[0] = h_padding_bit; }
        */
     }
-    System.out.print("READ_HEADER_ED");
+    return 0;
   }
 
   /**