diff --git a/container/mts/psi/helpers.go b/container/mts/psi/helpers.go index 1a780f81..18287fc3 100644 --- a/container/mts/psi/helpers.go +++ b/container/mts/psi/helpers.go @@ -75,17 +75,6 @@ func SyntaxSecLenFrom(p []byte) int { return int(((p[SyntaxSecLenIdx1] & SyntaxSecLenMask1) << 8) | p[SyntaxSecLenIdx2]) } -// TimeFrom takes a byte slice representation of a psi-pmt and extracts it's -// timestamp, returning as a uint64 if it exists, otherwise returning 0 and nil -// if it does not exist -func TimeFrom(p []byte) (t uint64, err error) { - if !HasTime(p) { - return 0, errors.New("pmt does not have a time descriptor") - } - t = binary.BigEndian.Uint64(p[TimeDataIndx : TimeDataIndx+TimeDataSize]) - return t, nil -} - // LocationFrom takes a byte slice representation of a psi-pmt and extracts it's // timestamp, returning as a uint64 if it exists, otherwise returning 0 and nil // if it does not exist diff --git a/container/mts/psi/psi_test.go b/container/mts/psi/psi_test.go index 657ed533..57780878 100644 --- a/container/mts/psi/psi_test.go +++ b/container/mts/psi/psi_test.go @@ -313,17 +313,6 @@ func TestTimeUpdate(t *testing.T) { } } -// TestTimeGet tsts to see if we can correctly get the timestamp from a pmt -func TestTimeGet(t *testing.T) { - s, err := TimeFrom(pmtTimeBytes1) - if err != nil { - t.Errorf("Getting timestamp failed with err: %v", err) - } - if s != tstTime1 { - t.Errorf(errCmp, "TestTimeGet", tstTime1, s) - } -} - // TestLocationGet checks that we can correctly get location data from a pmt table func TestLocationGet(t *testing.T) { pb := standardPmtWithMeta.Bytes()