ossrs / httpx-static

A HTTP/HTTPS API proxy for SRS.
https://github.com/ossrs/srs
MIT License
641 stars 221 forks source link

RtmpUint16 UnmarshalBinary incorrect byteorder #55

Open avfedorov opened 8 years ago

avfedorov commented 8 years ago

Byteorder in protocol.RtmpUint16 UnmarshalBinary is incorrect. Current: v = RtmpUint16(uint16(data[0]) | uint16(data[1])<<8) Must be: v = RtmpUint16(uint16(data[1]) | uint16(data[0])<<8)

This leads to an incorrect decoding of UserControlMessage for example.

winlinvip commented 8 years ago

Thanks, I will check it.