 
   parseNALUnit: (nalUnit) ->
     data = {}
-    nalUnitCopy = new Buffer nalUnit.length
-    nalUnit.copy nalUnitCopy
-    api.removeEmulationPreventionByte nalUnitCopy
-    bits = new Bits nalUnitCopy
+    nalUnit = api.removeEmulationPreventionByte nalUnit
+    bits = new Bits nalUnit
     data.nalHeader = api.read_nal_header bits
     if data.nalHeader.nal_unit_type in [
       api.NAL_UNIT_TYPE_NON_IDR_PICTURE

    return

  readPPS: (nalUnit) ->
    nalUnitCopy = new Buffer nalUnit.length
    nalUnit.copy nalUnitCopy
    api.removeEmulationPreventionByte nalUnitCopy
    bits = new Bits nalUnitCopy
    api.read_nal_header bits
    pic_parameter_set_id = bits.read_ue()
    seq_parameter_set_id = bits.read_ue()

    api.read_sei_payload(bits, payloadType, payloadSize)

  readSEI: (nalUnit) ->
    nalUnit = api.removeEmulationPreventionByte nalUnit
    bits = new Bits nalUnit
    api.read_nal_header bits
    loop
      api.read_sei_message bits
