geeksville / Micro-RTSP

A RTSP video server intended for very small CPUs (ESP32 etc)
MIT License
755 stars 199 forks source link

Avoid flooding of the UDP socket #28

Open beegee-tokyo opened 4 years ago

beegee-tokyo commented 4 years ago

Without an delay after SendRtpPacket the UDP socket is flooded with send requests and runs out of buffer. A small delay allows FreeRTOS to do a task switch and gives the UDP socket time to actually send some data.

gururise commented 3 years ago

I great a constant stream of warning messages after implementing this change: warning exceeding max frame rate of 167 ms

brainrecall commented 3 years ago

A delay of 10ms is huge. I would replace this with yield() which would accomplish the goal of task switching without the unneeded delay.