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

@ -361,7 +361,8 @@ static void rtp_audio_process_capture(void *data)
pw_log_warn("expected %u != timestamp %u", expected_timestamp, timestamp);
impl->have_sync = false;
} else if (filled + wanted > (int32_t)SPA_MIN(impl->target_buffer * 8, BUFFER_SIZE / stride)) {
pw_log_warn("overrun %u + %u > %u", filled, wanted, BUFFER_SIZE / stride);
pw_log_warn("overrun %u + %u > %u/%u", filled, wanted,
impl->target_buffer * 8, BUFFER_SIZE / stride);
impl->have_sync = false;
filled = 0;
}