diff --git a/README.md b/README.md index 2360de420..1e778e66e 100755 --- a/README.md +++ b/README.md @@ -155,6 +155,8 @@ For previous versions, please read: ## V4 changes +* v4.0, 2021-02-04, At least wait 1ms when <1ms, to avoid epoll_wait spin loop. 4.0.66 +* v4.0, 2021-01-31, Enable -std=c++11 by default. 4.0.65 * v4.0, 2021-01-25, Enable --nasm and --srtp-asm by default for performance. 4.0.64 * v4.0, 2021-01-20, Support HTTP-FLV and HLS for srs-player by H5. 4.0.63 * v4.0, 2021-01-08, HTML5 video tag resolution adaptive. 4.0.59 diff --git a/trunk/3rdparty/st-srs/event.c b/trunk/3rdparty/st-srs/event.c index 142882a51..5b640c104 100644 --- a/trunk/3rdparty/st-srs/event.c +++ b/trunk/3rdparty/st-srs/event.c @@ -1210,6 +1210,11 @@ ST_HIDDEN void _st_epoll_dispatch(void) } else { min_timeout = (_ST_SLEEPQ->due <= _ST_LAST_CLOCK) ? 0 : (_ST_SLEEPQ->due - _ST_LAST_CLOCK); timeout = (int) (min_timeout / 1000); + + // At least wait 1ms when <1ms, to avoid epoll_wait spin loop. + if (min_timeout > 0 && timeout == 0) { + timeout = 1; + } } if (_st_epoll_data->pid != getpid()) { diff --git a/trunk/src/core/srs_core_version4.hpp b/trunk/src/core/srs_core_version4.hpp index c50b667a2..916b6e361 100644 --- a/trunk/src/core/srs_core_version4.hpp +++ b/trunk/src/core/srs_core_version4.hpp @@ -24,6 +24,6 @@ #ifndef SRS_CORE_VERSION4_HPP #define SRS_CORE_VERSION4_HPP -#define SRS_VERSION4_REVISION 65 +#define SRS_VERSION4_REVISION 66 #endif