1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-02-13 11:51:57 +00:00
This commit is contained in:
zhengfl 2014-10-02 20:25:36 +08:00
parent bafdd83122
commit 2317f0e767

View file

@ -198,13 +198,7 @@ bool SrsQueueRecvThread::can_handle()
// for the message may cause the thread to stop,
// when stop, the thread is freed, so the messages
// are dropped.
bool e = empty();
#ifdef SRS_PERF_QUEUE_COND_WAIT
if (_consumer && !e) {
_consumer->on_dispose();
}
#endif
return e;
return empty();
}
int SrsQueueRecvThread::handle(SrsCommonMessage* msg)
@ -212,7 +206,11 @@ int SrsQueueRecvThread::handle(SrsCommonMessage* msg)
// put into queue, the send thread will get and process it,
// @see SrsRtmpConn::process_play_control_msg
queue.push_back(msg);
#ifdef SRS_PERF_QUEUE_COND_WAIT
if (_consumer) {
_consumer->on_dispose();
}
#endif
return ERROR_SUCCESS;
}