module-rtp: calculate payload_size based on MTU

The actual payload size depends on the MTU but should not include the
IP/UDP and RTP headers.

Fixes #4396
This commit is contained in:
Wim Taymans 2024-11-11 11:49:20 +01:00
parent 73b5a10021
commit a53bc035c0
4 changed files with 15 additions and 4 deletions

View file

@ -19,6 +19,9 @@ struct rtp_stream;
#define ERROR_MSEC 2.0f
#define DEFAULT_SESS_LATENCY 100.0f
/* 28 bytes IP/UDP, 12 bytes RTP header */
#define PACKET_HEADER_SIZE (12+28)
#define DEFAULT_MTU 1280
#define DEFAULT_MIN_PTIME 2.0f
#define DEFAULT_MAX_PTIME 20.0f