mts: small style/syntax changes

This commit is contained in:
Trek H 2021-03-31 20:33:51 +10:30
parent ed40392bb5
commit 5dac5f952c
1 changed files with 3 additions and 3 deletions

View File

@ -420,7 +420,7 @@ func resetAdaptation(p *packet.Packet) error {
return nil 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. // indicator according to f.
func DiscontinuityIndicator(f bool) Option { func DiscontinuityIndicator(f bool) Option {
return func(p *packet.Packet) { 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 // We've reached the end of the entire MTS clip so if we're segmenting we need
// to append current segment to res. // to append current segment to res.
if segmenting { if segmenting {
res = append(res, d[start:len(d)]) res = append(res, d[start:])
} }
return res, nil 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) { func PID(p []byte) (uint16, error) {
if len(p) < PacketSize { if len(p) < PacketSize {
return 0, errors.New("packet length less than 188") return 0, errors.New("packet length less than 188")