From b62a049dae47ca90761432209b7227fe31ee0c6c Mon Sep 17 00:00:00 2001 From: "SmallChi(Koike)" <564952747@qq.com> Date: Sat, 12 Sep 2020 11:51:50 +0800 Subject: [PATCH] =?UTF-8?q?Flv=E7=BC=96=E7=A0=81=E5=99=A8=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E4=B8=A4=E5=80=8D=E7=9A=84=E5=86=85=E5=AD=98=E7=BC=93?= =?UTF-8?q?=E5=86=B2=E5=8C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/JT1078.Flv/FlvEncoder.cs | 4 ++-- src/JT1078.Flv/JT1078.Flv.csproj | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/JT1078.Flv/FlvEncoder.cs b/src/JT1078.Flv/FlvEncoder.cs index 8b58c3e..783aea1 100644 --- a/src/JT1078.Flv/FlvEncoder.cs +++ b/src/JT1078.Flv/FlvEncoder.cs @@ -202,7 +202,7 @@ namespace JT1078.Flv public byte[] EncoderVideoTag(JT1078Package package, bool needVideoHeader = false) { if (package.Label3.DataType == JT1078DataType.音频帧) return default; - byte[] buffer = FlvArrayPool.Rent(package.Bodies.Length); + byte[] buffer = FlvArrayPool.Rent(package.Bodies.Length*2); FlvMessagePackWriter flvMessagePackWriter = new FlvMessagePackWriter(buffer); var nalus = h264Decoder.ParseNALU(package); if (nalus != null && nalus.Count > 0) @@ -274,7 +274,7 @@ namespace JT1078.Flv /// public byte[] EncoderOtherVideoTag(H264NALU nALU) { - byte[] buffer = FlvArrayPool.Rent(nALU.RawData.Length); + byte[] buffer = FlvArrayPool.Rent(nALU.RawData.Length*2); try { FlvMessagePackWriter flvMessagePackWriter = new FlvMessagePackWriter(buffer); diff --git a/src/JT1078.Flv/JT1078.Flv.csproj b/src/JT1078.Flv/JT1078.Flv.csproj index 87b6326..71ff164 100644 --- a/src/JT1078.Flv/JT1078.Flv.csproj +++ b/src/JT1078.Flv/JT1078.Flv.csproj @@ -14,7 +14,7 @@ https://github.com/SmallChi/JT1078/blob/master/LICENSE https://github.com/SmallChi/JT1078/blob/master/LICENSE false - 1.0.0-preview8 + 1.0.0-preview9 false true LICENSE