protocol/rtp: simplified hasExt function

This commit is contained in:
Saxon 2019-04-10 12:52:05 +09:30
parent ff0c62910c
commit a0fb380717
1 changed files with 1 additions and 4 deletions

View File

@ -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