From 7a3a7dcd8e7331f48ebe20a245d479b51c022b22 Mon Sep 17 00:00:00 2001 From: kozabrada123 <59031733+kozabrada123@users.noreply.github.com> Date: Fri, 12 Jan 2024 17:40:40 +0100 Subject: [PATCH] chore: update on packet size FIXME --- src/voice/udp/handler.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/voice/udp/handler.rs b/src/voice/udp/handler.rs index 67f4f3e..3b26e28 100644 --- a/src/voice/udp/handler.rs +++ b/src/voice/udp/handler.rs @@ -151,6 +151,12 @@ impl UdpHandler { loop { // FIXME: is there a max size for these packets? // Allocating 512 bytes seems a bit extreme + // + // Update: see + // > "The RTP standard does not set a maximum size.." + // + // The theorhetical max for this buffer would be 1458 bytes, but that is imo + // unreasonable to allocate for every message. let mut buf: Vec = vec![0; 512]; let result = self.socket.recv(&mut buf).await;