diff --git a/stream/mts/mpegts.go b/stream/mts/mpegts.go index e9bbf0e1..c3c0d390 100644 --- a/stream/mts/mpegts.go +++ b/stream/mts/mpegts.go @@ -160,19 +160,19 @@ type Packet struct { // FindPMT will take a clip of mpegts and try to find a PMT table - if one // is found, then it is returned along with its index, otherwise nil, -1 and an error is returned. -func FindPMT(d []byte) ([]byte, int, error) { - return FindPID(d, PmtPid) +func FindPmt(d []byte) ([]byte, int, error) { + return FindPid(d, PmtPid) } // FindPAT will take a clip of mpegts and try to find a PAT table - if one // is found, then it is returned along with its index, otherwise nil, -1 and an error is returned. -func FindPAT(d []byte) ([]byte, int, error) { - return FindPID(d, PatPid) +func FindPat(d []byte) ([]byte, int, error) { + return FindPid(d, PatPid) } // FindPID will take a clip of mpegts and try to find a packet with given PID - if one // is found, then it is returned along with its index, otherwise nil, -1 and an error is returned. -func FindPID(d []byte, pid uint16) (pkt []byte, i int, err error) { +func FindPid(d []byte, pid uint16) (pkt []byte, i int, err error) { if len(d) < PacketSize { return nil, -1, errors.New("Mmpegts data not of valid length") } @@ -183,7 +183,7 @@ func FindPID(d []byte, pid uint16) (pkt []byte, i int, err error) { return } } - return nil, -1, fmt.Errorf("could not find packet with pid: %d",pid) + return nil, -1, fmt.Errorf("could not find packet with pid: %d", pid) } // FillPayload takes a channel and fills the packets Payload field until the