public static void joinNALUnitsToBuffer ( List < ByteBuffer > nalUnits , ByteBuffer out ) { for ( ByteBuffer nal : nalUnits ) { out . putInt ( 1 ) ; out . put ( nal . duplicate ( ) ) ; } }
Joins buffers containing individual NAL units into a single AnnexB delimited buffer . Each NAL unit will be separated with 00 00 00 01 markers .