mirror of https://bitbucket.org/ausocean/av.git
pes: MaxPesSize to MaxPesLen
This commit is contained in:
parent
49a6acbde8
commit
b28861d690
|
@ -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
|
||||
|
||||
|
|
|
@ -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{
|
||||
|
|
Loading…
Reference in New Issue