From 92c8c0505d392ed7e74e87bc8309520ea317201e Mon Sep 17 00:00:00 2001 From: xialixin Date: Sat, 13 May 2017 09:21:02 +0800 Subject: [PATCH] Fix the timebase bug, change from us to ms. (#876) * fix SRS_CONSTS_RTMP_PULSE_TMMS (int64_t)(500*1000LL) * fix SrsBufferCache::cycle st_usleep(SRS_CONSTS_RTMP_PULSE_TMMS * 1000) * fix st_usleep(SRS_CONSTS_RTMP_PULSE_TMMS * 1000) --- trunk/src/app/srs_app_http_stream.cpp | 2 +- trunk/src/app/srs_app_source.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/trunk/src/app/srs_app_http_stream.cpp b/trunk/src/app/srs_app_http_stream.cpp index 1865dff98..ceb5342db 100755 --- a/trunk/src/app/srs_app_http_stream.cpp +++ b/trunk/src/app/srs_app_http_stream.cpp @@ -572,7 +572,7 @@ int SrsLiveStream::serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r) if (count <= 0) { srs_info("http: sleep %dms for no msg", SRS_CONSTS_RTMP_PULSE_TMMS); // directly use sleep, donot use consumer wait. - st_usleep(SRS_CONSTS_RTMP_PULSE_TMMS); + st_usleep(SRS_CONSTS_RTMP_PULSE_TMMS * 1000); // ignore when nothing got. continue; diff --git a/trunk/src/app/srs_app_source.cpp b/trunk/src/app/srs_app_source.cpp index 94343c2af..d4c979ee8 100755 --- a/trunk/src/app/srs_app_source.cpp +++ b/trunk/src/app/srs_app_source.cpp @@ -550,7 +550,7 @@ int SrsConsumer::dump_packets(SrsMessageArray* msgs, int& count) void SrsConsumer::wait(int nb_msgs, int duration) { if (paused) { - st_usleep(SRS_CONSTS_RTMP_PULSE_TMMS); + st_usleep(SRS_CONSTS_RTMP_PULSE_TMMS * 1000); return; }