@Override
        public OggPacket getNextPacket() throws IOException {
            if(inProgress) {
                inProgress = false;
                return super.getNextPacket();
            } else {
                inProgress = true;
            }

            OggPacket p = super.getNextPacket();
            inProgress = false;

            if(p != null) {
                lastSeqNum = p.getSequenceNumber();

                if(p.isBeginningOfStream()) {
                    System.out.println(
                            "New logical stream " + 
                            Integer.toHexString(p.getSid()) +
                            " (" + p.getSid() + ") found"
                    );
                }
                if(p.isEndOfStream()) {
                    System.out.println(
                            "Logical stream " + 
                            Integer.toHexString(p.getSid()) +
                            " (" + p.getSid() + ") completed"
                    );
                }
            }
            return p;
        }