stream/mts: corrected func comments for FindPat, FindPmt and FindPid

This commit is contained in:
Saxon 2019-02-28 11:06:27 +10:30
parent 1e9b6c25c9
commit a7989955ca
1 changed files with 3 additions and 3 deletions

View File

@ -158,19 +158,19 @@ type Packet struct {
Payload []byte // Mpeg ts Payload Payload []byte // Mpeg ts Payload
} }
// FindPMT will take a clip of mpegts and try to find a PMT table - if one // 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. // 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) { func FindPmt(d []byte) ([]byte, int, error) {
return FindPid(d, PmtPid) return FindPid(d, PmtPid)
} }
// FindPAT will take a clip of mpegts and try to find a PAT table - if one // 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. // 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) { func FindPat(d []byte) ([]byte, int, error) {
return FindPid(d, PatPid) return FindPid(d, PatPid)
} }
// FindPID will take a clip of mpegts and try to find a packet with given PID - if one // 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. // 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 { if len(d) < PacketSize {