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
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
var errNoPesPayload = errors.New("no PES payload")
|
var (
|
||||||
var errNoPesPTS = errors.New("no PES PTS")
|
errNoPesPayload = errors.New("no PES payload")
|
||||||
var errInvalidPesHeader = errors.New("invalid PES header")
|
errNoPesPTS = errors.New("no PES PTS")
|
||||||
var errInvalidPesPayload = errors.New("invalid PES payload")
|
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.
|
// GetPTS returns a PTS from a packet that has PES payload, or an error otherwise.
|
||||||
func GetPTS(pkt []byte) (pts int64, err error) {
|
func GetPTS(pkt []byte) (pts int64, err error) {
|
||||||
|
|
Loading…
Reference in New Issue