diff --git a/trunk/src/app/srs_app_recv_thread.cpp b/trunk/src/app/srs_app_recv_thread.cpp index afce8a81f..d73204de9 100755 --- a/trunk/src/app/srs_app_recv_thread.cpp +++ b/trunk/src/app/srs_app_recv_thread.cpp @@ -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; }