diff --git a/stream/mts/psi/psi.go b/stream/mts/psi/psi.go index 2bace251..11e36d38 100644 --- a/stream/mts/psi/psi.go +++ b/stream/mts/psi/psi.go @@ -341,14 +341,6 @@ func (p *PSIBytes) createDescriptor(tag int, data []byte) { updateCrc((*p)[1:]) } -// TODO: make this safer. If no padding, does this index out of range ? -func (p *PSIBytes) trimPadding() []byte { - sectionLength := SyntaxSecLenFrom(*p) - paddingIdx := (4 + sectionLength) - o := (*p)[:paddingIdx] - return o -} - func (p *PSIBytes) setProgInfoLen(l int) { // TODO: check if pmt first (*p)[ProgramInfoLenIdx1] &= 0xff ^ ProgramInfoLenMask1