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
|
||||
// must be compatible otherwise we panic.
|
||||
func hasExt(d []byte) bool {
|
||||
if (d[0] & 0x10 >> 4) == 1 {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
return (d[0] & 0x10 >> 4) == 1
|
||||
}
|
||||
|
||||
// csrcCount returns the number of CSRC fields. If the version is not compatible
|
||||
|
|
Loading…
Reference in New Issue