mirror of https://bitbucket.org/ausocean/av.git
Tidy up errors used by GetPTS().
This commit is contained in:
parent
590bdc2c2d
commit
e76b8b3800
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue