diff --git a/stream/mts/psi/op.go b/stream/mts/psi/op.go index 78730fc2..18fcd42c 100644 --- a/stream/mts/psi/op.go +++ b/stream/mts/psi/op.go @@ -64,16 +64,16 @@ func HasLocation(p []byte) error { // UpdateTime takes the byte slice representation of a psi-pmt as well as a time // 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 := HasTime(d) +func UpdateTime(dst []byte, t uint64) error { + err := HasTime(dst) if err != nil { return err } ts := TimeBytes(uint64(t)) - for i := range d[timeDataIndx : timeDataIndx+timeDataSize] { - d[i+timeDataIndx] = ts[i] + for i := range dst[timeDataIndx : timeDataIndx+timeDataSize] { + dst[i+timeDataIndx] = ts[i] } - d = updateCrc(d) + dst = updateCrc(dst) return nil }