From 514a028eac7225783326a73ae58512def6184f7f Mon Sep 17 00:00:00 2001 From: xia-chu <771730766@qq.com> Date: Wed, 28 Apr 2021 16:03:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dfu-a=E6=89=93=E5=8C=85?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E6=97=A0rtp=E8=B4=9F=E8=BD=BD=E7=9A=84?= =?UTF-8?q?=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Extension/H264Rtp.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Extension/H264Rtp.cpp b/src/Extension/H264Rtp.cpp index 51f899d2..f9f4f570 100644 --- a/src/Extension/H264Rtp.cpp +++ b/src/Extension/H264Rtp.cpp @@ -204,9 +204,9 @@ void H264RtpEncoder::packRtp(const char *ptr, size_t len, uint32_t pts, bool is_ } void H264RtpEncoder::packRtpFu(const char *ptr, size_t len, uint32_t pts, bool is_mark, bool gop_pos){ - auto packet_size = getMaxSize() - 2; + auto packet_size = getMaxSize() - 1; if (len <= packet_size) { - //小于FU-A打包最小字节长度要求,采用STAP-A模式,如果frame长度正好是mtu-2, 那么打包的rtp长度是mtu + 1 + //小于FU-A打包最小字节长度要求,采用STAP-A模式 packRtpStapA(ptr, len, pts, is_mark, gop_pos); return; }