From 04840742cf93db8414108552a08d48de053e3cc7 Mon Sep 17 00:00:00 2001 From: Zhou Weimin Date: Sun, 19 Jul 2020 07:21:18 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Drtsp=E6=8B=89=E6=B5=81rtp=20F?= =?UTF-8?q?U-A=E6=9C=80=E5=90=8E=E4=B8=80=E4=B8=AA=E5=88=86=E7=89=87size?= =?UTF-8?q?=E4=B8=BA0=E7=9A=84=E9=97=AE=E9=A2=98;#424?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Extension/H264Rtp.cpp | 4 ++-- src/Extension/H265Rtp.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Extension/H264Rtp.cpp b/src/Extension/H264Rtp.cpp index 481c57a7..76958147 100644 --- a/src/Extension/H264Rtp.cpp +++ b/src/Extension/H264Rtp.cpp @@ -234,7 +234,7 @@ void H264RtpEncoder::inputFrame(const Frame::Ptr &frame) { bool mark = false; int nOffset = 1; while (!mark) { - if (iLen < nOffset + iSize) { + if (iLen <= nOffset + iSize) { //已经拆分结束 iSize = iLen - nOffset; mark = true; @@ -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); } -}//namespace mediakit \ No newline at end of file +}//namespace mediakit diff --git a/src/Extension/H265Rtp.cpp b/src/Extension/H265Rtp.cpp index d1f52bba..6af6c6ee 100644 --- a/src/Extension/H265Rtp.cpp +++ b/src/Extension/H265Rtp.cpp @@ -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 \ No newline at end of file +}//namespace mediakit