SectionReader implements TsPayloadReader { @Override public void seek() { waitingForPayloadStart = true; } SectionReader(SectionPayloadReader reader); @Override void init(TimestampAdjuster timestampAdjuster, ExtractorOutput extractorOutput,
      TrackIdGenerator idGenerator); @Override void seek(); @Override void consume(ParsableByteArray data, @Flags int flags);  }
@Test public void testSeek() { packetPayload[0] = 13; insertTableSection(1, (byte) 109, 10); insertTableSection(14, (byte) 110, 300); packetPayload[300] = 17; insertTableSection(318, (byte) 111, 10); ParsableByteArray firstPacket = new ParsableByteArray(packetPayload, 100); reader.consume(firstPacket, FLAG_PAYLOAD_UNIT_START_INDICATOR); assertThat(payloadReader.parsedTableIds).isEmpty(); ParsableByteArray secondPacket = new ParsableByteArray(packetPayload, 200); secondPacket.setPosition(100); reader.consume(secondPacket, 0); assertThat(payloadReader.parsedTableIds).isEmpty(); ParsableByteArray thirdPacket = new ParsableByteArray(packetPayload, 300); thirdPacket.setPosition(200); reader.consume(thirdPacket, 0); assertThat(payloadReader.parsedTableIds).isEmpty(); reader.seek(); ParsableByteArray fourthPacket = new ParsableByteArray(packetPayload); fourthPacket.setPosition(300); reader.consume(fourthPacket, FLAG_PAYLOAD_UNIT_START_INDICATOR); assertThat(payloadReader.parsedTableIds).isEqualTo(singletonList(111)); }