diff --git a/stream/mts/encoder.go b/stream/mts/encoder.go index e6f35728..95dbb441 100644 --- a/stream/mts/encoder.go +++ b/stream/mts/encoder.go @@ -34,6 +34,7 @@ import ( "bitbucket.org/ausocean/av/stream/mts/pes" "bitbucket.org/ausocean/av/stream/mts/psi" + "fmt" ) var ( @@ -63,7 +64,7 @@ func GpsMeta(g string) { func init() { patTable = psi.StdPat.Bytes() - pmtTable = psi.StdPmt.Bytes() + pmtTable = psi.StdPmtTimeGps.Bytes() } const ( @@ -199,13 +200,15 @@ func (e *Encoder) writePSI() error { } */ + packet := addPadding(pmtTable) + fmt.Println(len(pmtTable)) // Create mts packet from pmt table pmtPkt := Packet{ PUSI: true, PID: pmtPid, CC: e.ccFor(pmtPid), AFC: hasPayload, - Payload: addPadding(pmtTable), + Payload: packet, } _, err = e.dst.Write(pmtPkt.Bytes()) if err != nil { diff --git a/stream/mts/psi/std.go b/stream/mts/psi/std.go index 34647821..95aaf806 100644 --- a/stream/mts/psi/std.go +++ b/stream/mts/psi/std.go @@ -81,7 +81,7 @@ var ( Pf: 0x00, Tid: 0x02, Ssi: true, - Sl: uint16(0x12), + Sl: uint16(0x3e), Tss: &TSS{ Tide: uint16(0x01), V: 0,