mirror of https://bitbucket.org/ausocean/av.git
protocol/rtp: updated parse.go function comments
This commit is contained in:
parent
a0fb380717
commit
0700a8270d
|
@ -51,14 +51,12 @@ func Payload(d []byte) ([]byte, error) {
|
||||||
return d[payloadIdx:], nil
|
return d[payloadIdx:], nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// hasExt returns true if an extension is present in the RTP packet. The version
|
// hasExt returns true if an extension is present in the RTP packet.
|
||||||
// must be compatible otherwise we panic.
|
|
||||||
func hasExt(d []byte) bool {
|
func hasExt(d []byte) bool {
|
||||||
return (d[0] & 0x10 >> 4) == 1
|
return (d[0] & 0x10 >> 4) == 1
|
||||||
}
|
}
|
||||||
|
|
||||||
// csrcCount returns the number of CSRC fields. If the version is not compatible
|
// csrcCount returns the number of CSRC fields.
|
||||||
// we panic.
|
|
||||||
func csrcCount(d []byte) int {
|
func csrcCount(d []byte) int {
|
||||||
return int(d[0] & 0x0f)
|
return int(d[0] & 0x0f)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue