private boolean hasPrefix(byte[] nal){
  if (nal[0] == 0 && nal[1] == 0 && nal[2] == 0 && nal[3] == 0x01)   return true;
 else   return false;
}

private boolean hasPrefix ( byte [ ] nal ) { if ( nal [ 0 ] == 0 && nal [ 1 ] == 0 && nal [ 2 ] == 0 && nal [ 3 ] == 0x01 ) return true ; else return false ; }
makes sure the nal has a header or not .
