question: public static byte [ ] [ ] splitNalUnits ( byte [ ] data ) { if ( ! isNalStartCode ( data , 0 ) ) { return null ; } List < Integer > starts = new ArrayList < > ( ) ; int nalUnitIndex = 0 ; do { starts . add ( nalUnitIndex ) ; nalUnitIndex = findNalStartCode ( data , nalUnitIndex + NAL_START_CODE . length ) ; } while ( nalUnitIndex != - 1 ) ; byte [ ] [ ] split = new byte [ starts . size ( ) ] [ ] ; for ( int i = 0 ; i < starts . size ( ) ; i ++ ) { int startIndex = starts . get ( i ) ; int endIndex = i < starts . size ( ) - 1 ? starts . get ( i + 1 ) : data . length ; byte [ ] nal = new byte [ endIndex - startIndex ] ; System . arraycopy ( data , startIndex , nal , 0 , nal . length ) ; split [ i ] = nal ; } return split ; }
target:  Splits an array of NAL units. <p> If the input consists of NAL start code delimited units, then the returned array consists of the split NAL units, each of which is still prefixed with the NAL start code. For any other input, null is returned.