static correctEnca(initSegmentBuffer) {
    const initSegment = shaka.util.BufferUtils.toUint8(initSegmentBuffer);
    const modifiedInitSegment = initSegment;

    /**
     * Skip reserved bytes: 6
     * Skip data_reference_index: 2
     * Skip reserved bytes: 8
     */
    const encaChannelCountOffset = 16;

    /** @type {?DataView} */
    let encaBoxDataView = null;

    new shaka.util.Mp4Parser()
        .box('moov', shaka.util.Mp4Parser.children)
        .box('trak', shaka.util.Mp4Parser.children)
        .box('mdia', shaka.util.Mp4Parser.children)
        .box('minf', shaka.util.Mp4Parser.children)
        .box('stbl', shaka.util.Mp4Parser.children)
        .fullBox('stsd', shaka.util.Mp4Parser.sampleDescription)
        .box('enca', (box) => {
          encaBoxDataView = box.reader.getDataView();
          return shaka.util.Mp4Parser.audioSampleEntry(box);
        })
        .box('sinf', shaka.util.Mp4Parser.children)
        .box('frma', (box) => {
          box.parser.stop();
          const {codec} = shaka.util.Mp4BoxParsers.parseFRMA(box.reader);
          if (codec === 'ec-3' &&
                encaBoxDataView &&
                encaBoxDataView.getUint16(encaChannelCountOffset) !== 2
          ) {
            encaBoxDataView.setUint16(encaChannelCountOffset, 2);
          }
        })
        .parse(initSegment);

    return modifiedInitSegment;
  }
For EAC-3 audio, the "enca" box ChannelCount field
MUST always be set to 2.
See ETSI TS 102 366 V1.2.1 Sec F.3

Clients SHOULD ignore this value; however, it has been discovered that
some user agents don't, and instead, invalid values here can cause decoder
failures to be thrown (this has been observed with Chromecast).

Given that this value MUST be hard-coded to 2, and that clients "SHALL"
ignore the value, it seems safe to manipulate the value to be 2 even when
the packager has provided a different value.
@param {!BufferSource} initSegmentBuffer
@return {!Uint8Array}