drop SEI and AUD for h264 and h265 avoid sei as a frame

This commit is contained in:
xgj
2021-06-18 15:19:21 +08:00
parent a6e9652da8
commit 2335043cdf
3 changed files with 29 additions and 3 deletions

View File

@@ -165,8 +165,8 @@ void H265RtmpEncoder::inputFrame(const Frame::Ptr &frame) {
}
}
if(type == H265Frame::NAL_SEI_PREFIX || type == H265Frame::NAL_SEI_SUFFIX){
return;
if(type == H265Frame::NAL_SEI_PREFIX || type == H265Frame::NAL_SEI_SUFFIX || type == H265Frame::NAL_AUD){
return;// 防止sei aud 作为一帧
}
if (_lastPacket && (_lastPacket->time_stamp != frame->dts() || (type >=H264Frame::NAL_B_P && type<=H264Frame::NAL_IDR && (pcData[2]>>7 &0x01) !=0))) {