修复某些rtp包不兼容的bug

This commit is contained in:
xiongziliang 2020-05-08 21:57:56 +08:00
parent 683c8eef15
commit 3252f131ad

View File

@ -34,11 +34,11 @@ bool RtpReceiver::handleOneRtp(int track_index,SdpTrack::Ptr &track, unsigned ch
} }
uint8_t padding = 0; uint8_t padding = 0;
if (rtp_raw_ptr[0] & 0x40) { if (rtp_raw_ptr[0] & 0x20) {
//获取padding大小 //获取padding大小
padding = rtp_raw_ptr[rtp_raw_len - 1]; padding = rtp_raw_ptr[rtp_raw_len - 1];
//移除padding flag //移除padding flag
rtp_raw_ptr[0] &= ~0x40; rtp_raw_ptr[0] &= ~0x20;
//移除padding字节 //移除padding字节
rtp_raw_len -= padding; rtp_raw_len -= padding;
} }