回复GOP缓存从SPS开始

This commit is contained in:
xiongziliang 2018-10-30 15:59:59 +08:00
parent 37554da8cd
commit b4f8d35ef1
1 changed files with 2 additions and 2 deletions

View File

@ -191,7 +191,7 @@ void H264RtpEncoder::inputFrame(const Frame::Ptr &frame) {
const unsigned char s_e_r_Mid = 0x00;
const unsigned char s_e_r_End = 0x40;
//获取帧头数据1byte
unsigned char naluType = *((unsigned char *) pcData) & 0x1f; //获取NALU的5bit 帧类型
unsigned char naluType = H264_TYPE(pcData[0]); //获取NALU的5bit 帧类型
unsigned char nal_ref_idc = *((unsigned char *) pcData) & 0x60; //获取NALU的2bit 帧重要程度 00 可以丢 11不能丢
//nal_ref_idc = 0x60;
@ -257,7 +257,7 @@ void H264RtpEncoder::makeH264Rtp(const void* data, unsigned int len, bool mark,
rtppkt->offset = 16;
uint8_t type = H264_TYPE(((uint8_t *) (data))[0]);
RtpCodec::inputRtp(rtppkt,type == H264Frame::NAL_IDR);
RtpCodec::inputRtp(rtppkt,type == H264Frame::NAL_SPS);
_ui16Sequence++;
_ui32TimeStamp = uiStamp;
}