diff --git a/stream/mts/encoder.go b/stream/mts/encoder.go index e921248f..57422a3f 100644 --- a/stream/mts/encoder.go +++ b/stream/mts/encoder.go @@ -86,7 +86,7 @@ type Encoder struct { frameInterval time.Duration ptsOffset time.Duration tsSpace [PktLen]byte - pesSpace [pes.MaxPesSize]byte + pesSpace [pes.MaxPesLen]byte psiCount int diff --git a/stream/mts/pes/pes.go b/stream/mts/pes/pes.go index c74a2889..fb0878db 100644 --- a/stream/mts/pes/pes.go +++ b/stream/mts/pes/pes.go @@ -28,7 +28,7 @@ package pes import () -const MaxPesSize = 10000 +const MaxPesLen = 10000 /* The below data struct encapsulates the fields of an PES packet. Below is @@ -95,8 +95,8 @@ type Packet struct { } func (p *Packet) Bytes(buf []byte) []byte { - if buf == nil || cap(buf) != MaxPesSize { - buf = make([]byte, 0, MaxPesSize) + if buf == nil || cap(buf) != MaxPesLen { + buf = make([]byte, 0, MaxPesLen) } buf = buf[:0] buf = append(buf, []byte{