mirror of https://bitbucket.org/ausocean/av.git
protocol/rtp: simplified hasExt function
This commit is contained in:
parent
ff0c62910c
commit
a0fb380717
|
@ -54,10 +54,7 @@ func Payload(d []byte) ([]byte, error) {
|
||||||
// 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. The version
|
||||||
// must be compatible otherwise we panic.
|
// must be compatible otherwise we panic.
|
||||||
func hasExt(d []byte) bool {
|
func hasExt(d []byte) bool {
|
||||||
if (d[0] & 0x10 >> 4) == 1 {
|
return (d[0] & 0x10 >> 4) == 1
|
||||||
return true
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// csrcCount returns the number of CSRC fields. If the version is not compatible
|
// csrcCount returns the number of CSRC fields. If the version is not compatible
|
||||||
|
|
Loading…
Reference in New Issue