正在显示
1 个修改的文件
包含
6 行增加
和
8 行删除
@@ -198,13 +198,7 @@ bool SrsQueueRecvThread::can_handle() | @@ -198,13 +198,7 @@ bool SrsQueueRecvThread::can_handle() | ||
198 | // for the message may cause the thread to stop, | 198 | // for the message may cause the thread to stop, |
199 | // when stop, the thread is freed, so the messages | 199 | // when stop, the thread is freed, so the messages |
200 | // are dropped. | 200 | // are dropped. |
201 | - bool e = empty(); | ||
202 | -#ifdef SRS_PERF_QUEUE_COND_WAIT | ||
203 | - if (_consumer && !e) { | ||
204 | - _consumer->on_dispose(); | ||
205 | - } | ||
206 | -#endif | ||
207 | - return e; | 201 | + return empty(); |
208 | } | 202 | } |
209 | 203 | ||
210 | int SrsQueueRecvThread::handle(SrsCommonMessage* msg) | 204 | int SrsQueueRecvThread::handle(SrsCommonMessage* msg) |
@@ -212,7 +206,11 @@ int SrsQueueRecvThread::handle(SrsCommonMessage* msg) | @@ -212,7 +206,11 @@ int SrsQueueRecvThread::handle(SrsCommonMessage* msg) | ||
212 | // put into queue, the send thread will get and process it, | 206 | // put into queue, the send thread will get and process it, |
213 | // @see SrsRtmpConn::process_play_control_msg | 207 | // @see SrsRtmpConn::process_play_control_msg |
214 | queue.push_back(msg); | 208 | queue.push_back(msg); |
215 | - | 209 | +#ifdef SRS_PERF_QUEUE_COND_WAIT |
210 | + if (_consumer) { | ||
211 | + _consumer->on_dispose(); | ||
212 | + } | ||
213 | +#endif | ||
216 | return ERROR_SUCCESS; | 214 | return ERROR_SUCCESS; |
217 | } | 215 | } |
218 | 216 |
-
请 注册 或 登录 后发表评论