From 0b9f0f49fe08d5c4a0fc21e671c71dc316f549c8 Mon Sep 17 00:00:00 2001 From: saxon Date: Fri, 14 Dec 2018 16:11:45 +1030 Subject: [PATCH] psi: HasTime rather than chkTime --- stream/mts/psi/op.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stream/mts/psi/op.go b/stream/mts/psi/op.go index 56fed186..78730fc2 100644 --- a/stream/mts/psi/op.go +++ b/stream/mts/psi/op.go @@ -45,7 +45,7 @@ func TimeBytes(t uint64) (s []byte) { // ChkTime takes a psi as a byte slice and checks to see if it has a time descriptor // - if so return nil, otherwise return error -func ChkTime(p []byte) error { +func HasTime(p []byte) error { if p[timeTagIndx] != timeDescTag { return errors.New("PSI does not contain a time descriptor, cannot update") } @@ -65,7 +65,7 @@ func HasLocation(p []byte) error { // as an integer and attempts to update the time descriptor in the pmt with the // given time if the time descriptor exists, otherwise an error is returned func UpdateTime(d []byte, t uint64) error { - err := ChkTime(d) + err := HasTime(d) if err != nil { return err } @@ -81,7 +81,7 @@ func UpdateTime(d []byte, t uint64) error { // 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) { - err = ChkTime(p) + err = HasTime(p) if err != nil { return 0, err }