mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
merge from feilong, consumer directly sleep when paused.
This commit is contained in:
parent
8ace73f30d
commit
f9d1e1111a
1 changed files with 5 additions and 0 deletions
|
@ -525,6 +525,11 @@ int SrsConsumer::dump_packets(SrsMessageArray* msgs, int& count)
|
||||||
#ifdef SRS_PERF_QUEUE_COND_WAIT
|
#ifdef SRS_PERF_QUEUE_COND_WAIT
|
||||||
void SrsConsumer::wait(int nb_msgs, int duration)
|
void SrsConsumer::wait(int nb_msgs, int duration)
|
||||||
{
|
{
|
||||||
|
if (paused) {
|
||||||
|
st_usleep(SRS_CONSTS_RTMP_PULSE_TIMEOUT_US);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
mw_min_msgs = nb_msgs;
|
mw_min_msgs = nb_msgs;
|
||||||
mw_duration = duration;
|
mw_duration = duration;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue