From bccd7c276200d5ad552243984e92a9bef52e1a3f Mon Sep 17 00:00:00 2001 From: Saxon Date: Wed, 8 May 2019 00:07:23 +0930 Subject: [PATCH] container/mts/mpegts.go: error test for invalid packet size in FindPid corrected --- container/mts/mpegts.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/container/mts/mpegts.go b/container/mts/mpegts.go index 02634fe2..f47e78ba 100644 --- a/container/mts/mpegts.go +++ b/container/mts/mpegts.go @@ -175,7 +175,7 @@ func FindPat(d []byte) ([]byte, int, error) { // 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) { if len(d) < PacketSize { - return nil, -1, errors.New("Mpegts data not of valid length") + return nil, -1, errors.New("MPEGTS data not of valid length") } for i = 0; i < len(d); i += PacketSize { p := (uint16(d[i+1]&0x1f) << 8) | uint16(d[i+2])