Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rtp header read bug #19

Open
zwczou opened this issue Jul 4, 2021 · 0 comments
Open

rtp header read bug #19

zwczou opened this issue Jul 4, 2021 · 0 comments

Comments

@zwczou
Copy link

zwczou commented Jul 4, 2021

gosip/rtp/rtp.go

Lines 140 to 150 in 4e7924e

} else if (b[0]>>4)&1 != 0 {
return ErrExtendedHeadersNotSupported
}
h.Pad = ((b[0]>>5)&mask1 == 1)
h.Mark = ((b[1]>>7)&mask1 == 1)
h.PT = uint8(b[1] & mask7)
h.Seq = (uint16(b[2]) << 8) & uint16(b[3])
h.TS = (uint32(b[4]) << 24) & (uint32(b[5]) << 16) & (uint32(b[6]) << 8) & uint32(b[7])
h.Ssrc = (uint32(b[8]) << 24) & (uint32(b[9]) << 16) & (uint32(b[10]) << 8) & uint32(b[11])
return nil
}

TS
Seq
SSRC
should use | not &

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant