修复rtsp拉流rtp FU-A最后一个分片size为0的问题;#424

This commit is contained in:
Zhou Weimin
2020-07-19 07:21:18 +00:00
parent 7254c39fc2
commit 04840742cf
2 changed files with 4 additions and 4 deletions

View File

@@ -166,7 +166,7 @@ void H265RtpEncoder::inputFrame(const Frame::Ptr &frame) {
bool mark = false;
int nOffset = 2;
while (!mark) {
if (iLen < nOffset + maxSize) { //是否拆分结束
if (iLen <= nOffset + maxSize) { //是否拆分结束
maxSize = iLen - nOffset;
mark = true;
//FU end
@@ -208,4 +208,4 @@ void H265RtpEncoder::makeH265Rtp(int nal_type,const void* data, unsigned int len
RtpCodec::inputRtp(makeRtp(getTrackType(),data,len,mark,uiStamp),first_packet && H265Frame::isKeyFrame(nal_type));
}
}//namespace mediakit
}//namespace mediakit