From ac11b281c5696a1e5d95fecfa79f45abab1dd2a8 Mon Sep 17 00:00:00 2001 From: saxon Date: Fri, 14 Dec 2018 16:09:53 +1030 Subject: [PATCH] mts: patTable and pmtTable in var block instead of init func now --- stream/mts/encoder.go | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/stream/mts/encoder.go b/stream/mts/encoder.go index 3e9359b9..719ccd86 100644 --- a/stream/mts/encoder.go +++ b/stream/mts/encoder.go @@ -36,11 +36,6 @@ import ( "bitbucket.org/ausocean/av/stream/mts/psi" ) -var ( - patTable []byte - pmtTable []byte -) - const ( psiPacketSize = 184 psiSendCount = 21 @@ -61,10 +56,10 @@ func SetLocation(g string) { metaData.location = g } -func init() { +var ( patTable = psi.StdPat.Bytes() pmtTable = psi.StdPmtTimeLocation.Bytes() -} +) const ( sdtPid = 17