public void formatStream(int n){
		 if(first_call){
			 first_call = false;
			 writeIdV2();
		 }

		 byte[] frame_data = encoder.get_frame_data(n);

		 if(frame_data.length > 1){
			 if(frame_data.length + position + 1 <= stream.length)
				 System.arraycopy(frame_data,0,stream, position, frame_data.length);
			 else{
				 temp = new byte[(frame_data.length * N_FRAMES + position)];
				 System.arraycopy(stream,0,temp, 0, position);
				 System.arraycopy(frame_data,0,temp, position, frame_data.length );
				 stream = temp;
			 }

			 position += frame_data.length;
		 }
	 }