diff --git a/container/mts/mpegts.go b/container/mts/mpegts.go index 484254fe..0b356770 100644 --- a/container/mts/mpegts.go +++ b/container/mts/mpegts.go @@ -419,10 +419,12 @@ func GetPTSRange(clip []byte, pid uint16) (pts [2]uint64, err error) { return } -var errNoPesPayload = errors.New("no PES payload") -var errNoPesPTS = errors.New("no PES PTS") -var errInvalidPesHeader = errors.New("invalid PES header") -var errInvalidPesPayload = errors.New("invalid PES payload") +var ( + errNoPesPayload = errors.New("no PES payload") + errNoPesPTS = errors.New("no PES PTS") + errInvalidPesHeader = errors.New("invalid PES header") + errInvalidPesPayload = errors.New("invalid PES payload") +) // GetPTS returns a PTS from a packet that has PES payload, or an error otherwise. func GetPTS(pkt []byte) (pts int64, err error) {