From d49a8b8c6b38d31a6f3325d30db2e2c1a7cfcb26 Mon Sep 17 00:00:00 2001 From: saxon Date: Tue, 29 Jan 2019 22:09:17 +1030 Subject: [PATCH] stream/mts/psi.go: removed trimPadding function as we don't need this anymore --- stream/mts/psi/psi.go | 8 -------- 1 file changed, 8 deletions(-) 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