From c3668b3fc023b5d8f8026dbe5f067a784e9b366c Mon Sep 17 00:00:00 2001 From: Mike Brady Date: Tue, 8 Jan 2019 13:00:00 +0000 Subject: [PATCH] INcrease the delay between reading chunks of the RTSP message, may it less likely to overwhelm the CPU. --- rtsp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtsp.c b/rtsp.c index 74d1c54f..a90c5aa0 100644 --- a/rtsp.c +++ b/rtsp.c @@ -674,7 +674,7 @@ do { size_t read_chunk = msg_size - inbuf; if (read_chunk > max_read_chunk) read_chunk = max_read_chunk; - usleep(40000); // wait about 40 milliseconds between reads of up to about 64 kB + usleep(80000); // wait about 80 milliseconds between reads of up to about 64 kB nread = read(conn->fd, buf + inbuf, read_chunk); if (!nread) { reply = rtsp_read_request_response_error;