process(naluData) {
    const seiPayloads = [];
    const naluClone = this.removeEmu(naluData);

    // The following is an implementation of section 7.3.2.3.1
    // in Rec. ITU-T H.264 (06/2019), the H.264 spec.
    let offset = 0;

    while (offset < naluClone.length) {
      let payloadType = 0; // SEI payload type as defined by H.264 spec
      while (naluClone[offset] == 0xFF) {
        payloadType += 255;
        offset++;
      }
      payloadType += naluClone[offset++];

      let payloadSize = 0; // SEI payload size as defined by H.264 spec
      while (naluClone[offset] == 0xFF) {
        payloadSize += 255;
        offset++;
      }
      payloadSize += naluClone[offset++];

      // Payload type 4 is user_data_registered_itu_t_t35, as per the H.264
      // spec. This payload type contains caption data.
      if (payloadType == 0x04) {
        seiPayloads.push(naluClone.subarray(offset, offset + payloadSize));
      }
      offset += payloadSize;
    }

    return seiPayloads;
  }
Processes supplemental enhancement information data.
@param {!Uint8Array} naluData NALU from which SEI data is to be processed.
@return {!Array<!Uint8Array>}