From 404a2b6c9935ffcf09e1c301b14272946b2f42f4 Mon Sep 17 00:00:00 2001 From: saxon Date: Fri, 14 Dec 2018 16:21:56 +1030 Subject: [PATCH] psi: d to dst in updateTime --- stream/mts/psi/op.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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 }