houxiao
2017-01-10 43af8d48ca0d2ec219a7641d5555fe4c2479b047
RtspFace/PipeLinePool.cpp
@@ -87,11 +87,7 @@
PipeLine* PipeLinePool::get_free()
{
   if (pipelines_free.empty())
   {
      PLP_MUTEX_LOCK(pl_mutex, nullptr);
   }
   PLP_MUTEX_LOCK(tsafe_mutex, nullptr);
   
   if (pipelines_free.empty())
@@ -118,6 +114,19 @@
   pipelines_free.insert(pl);
   PLP_MUTEX_UNLOCK(tsafe_mutex,);
}
bool PipeLinePool::wait_free()
{
   if (pipelines_free.empty())
   {
      PLP_MUTEX_LOCK(pl_mutex, false);
   }
   
   PLP_MUTEX_UNLOCK(pl_mutex,);
   return true;
}
bool PipeLinePool::notify_free()
{
   PLP_MUTEX_UNLOCK(pl_mutex, false);
}