Tutorial :RTP sequence extract


A RTP packet consists of a 12-byte RTP header and subsequent RTP payload The 3rd and 4th byte of the header contain the Most-Significant-Byte and Least-Significant-Byte of the sequence number of the RTP packet Seq Num= (MSB<<8)+LSB

char pszPacket[12];


long lSeq = ???? - How to get the sequence number from a packet?


unsigned short seq = (packet[2] << 8) | packet[3];  


Surely thats just "long lSeq = (unsigned char)(pszPacket[2] << 8) | (unsigned char)pszPacket[3];"?

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »