psi: fixed issue with std psi

This commit is contained in:
saxon 2018-12-13 17:06:39 +10:30
parent b78904ac72
commit 05fd7c37d1
2 changed files with 6 additions and 3 deletions

View File

@ -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 {

View File

@ -81,7 +81,7 @@ var (
Pf: 0x00,
Tid: 0x02,
Ssi: true,
Sl: uint16(0x12),
Sl: uint16(0x3e),
Tss: &TSS{
Tide: uint16(0x01),
V: 0,