mirror of https://bitbucket.org/ausocean/av.git
mts: small style/syntax changes
This commit is contained in:
parent
ed40392bb5
commit
5dac5f952c
|
@ -420,7 +420,7 @@ func resetAdaptation(p *packet.Packet) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// DiscontinuityIndicator returns and Option that will set p's discontinuity
|
||||
// DiscontinuityIndicator returns an Option that will set p's discontinuity
|
||||
// indicator according to f.
|
||||
func DiscontinuityIndicator(f bool) Option {
|
||||
return func(p *packet.Packet) {
|
||||
|
@ -648,13 +648,13 @@ func SegmentForMeta(d []byte, key, val string) ([][]byte, error) {
|
|||
// We've reached the end of the entire MTS clip so if we're segmenting we need
|
||||
// to append current segment to res.
|
||||
if segmenting {
|
||||
res = append(res, d[start:len(d)])
|
||||
res = append(res, d[start:])
|
||||
}
|
||||
|
||||
return res, nil
|
||||
}
|
||||
|
||||
// pid returns the packet identifier for the given packet.
|
||||
// PID returns the packet identifier for the given packet.
|
||||
func PID(p []byte) (uint16, error) {
|
||||
if len(p) < PacketSize {
|
||||
return 0, errors.New("packet length less than 188")
|
||||
|
|
Loading…
Reference in New Issue