Skip to content

Commit 1a97d8b

Browse files
committed
F API improvements
1 parent c484454 commit 1a97d8b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/SharpRTSPServer/RTSPServer.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -727,9 +727,9 @@ public void SendRawRTP(RTSPConnection connection, RTPStream stream, List<Memory<
727727

728728
if(stream.Context != null)
729729
{
730-
byte[] rtp = new byte[stream.Context.EncodeRtpContext.CalculateRequiredSrtpPayloadLength(rtpPacket.Length)];
730+
byte[] rtp = new byte[stream.Context.CalculateRequiredSrtpPayloadLength(rtpPacket.Length)];
731731
rtpPacket.CopyTo(rtp);
732-
int ret = stream.Context.EncodeRtpContext.ProtectRtp(rtp, rtpPacket.Length, out var len);
732+
int ret = stream.Context.ProtectRtp(rtp, rtpPacket.Length, out var len);
733733
if (ret != 0) throw new Exception("Protect failed!");
734734
rtpPacket = rtp.AsMemory().Slice(0, len);
735735
}

0 commit comments

Comments
 (0)