Commit 4281a127 by xiongziliang

Merge remote-tracking branch 'origin/master'

parents a44a6342 81a38404
...@@ -234,7 +234,7 @@ void H264RtpEncoder::inputFrame(const Frame::Ptr &frame) { ...@@ -234,7 +234,7 @@ void H264RtpEncoder::inputFrame(const Frame::Ptr &frame) {
bool mark = false; bool mark = false;
int nOffset = 1; int nOffset = 1;
while (!mark) { while (!mark) {
if (iLen < nOffset + iSize) { if (iLen <= nOffset + iSize) {
//已经拆分结束 //已经拆分结束
iSize = iLen - nOffset; iSize = iLen - nOffset;
mark = true; mark = true;
...@@ -274,4 +274,4 @@ void H264RtpEncoder::makeH264Rtp(int nal_type,const void* data, unsigned int len ...@@ -274,4 +274,4 @@ void H264RtpEncoder::makeH264Rtp(int nal_type,const void* data, unsigned int len
RtpCodec::inputRtp(makeRtp(getTrackType(),data,len,mark,uiStamp),first_packet && nal_type == H264Frame::NAL_IDR); RtpCodec::inputRtp(makeRtp(getTrackType(),data,len,mark,uiStamp),first_packet && nal_type == H264Frame::NAL_IDR);
} }
}//namespace mediakit }//namespace mediakit
\ No newline at end of file
...@@ -166,7 +166,7 @@ void H265RtpEncoder::inputFrame(const Frame::Ptr &frame) { ...@@ -166,7 +166,7 @@ void H265RtpEncoder::inputFrame(const Frame::Ptr &frame) {
bool mark = false; bool mark = false;
int nOffset = 2; int nOffset = 2;
while (!mark) { while (!mark) {
if (iLen < nOffset + maxSize) { //是否拆分结束 if (iLen <= nOffset + maxSize) { //是否拆分结束
maxSize = iLen - nOffset; maxSize = iLen - nOffset;
mark = true; mark = true;
//FU end //FU end
...@@ -208,4 +208,4 @@ void H265RtpEncoder::makeH265Rtp(int nal_type,const void* data, unsigned int len ...@@ -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)); RtpCodec::inputRtp(makeRtp(getTrackType(),data,len,mark,uiStamp),first_packet && H265Frame::isKeyFrame(nal_type));
} }
}//namespace mediakit }//namespace mediakit
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论