houxiao
2017-08-11 3e52c086bcdeb2293e4a182863bcb984c79315d5
RtspFace/PL_RTSPServer2.cpp
@@ -129,6 +129,12 @@
         }
      }
      int ret = pthread_mutex_lock(_this->in->queue_empty_mutex);
      if (ret != 0)
      {
         LOG_WARN << "pthread_mutex_lock queue_empty_mutex, ret=" << ret << std::endl;
      }
      ScopeLocker<pthread_mutex_t>(_this->in->queue_mutex);
      if (_this->lastBuffer != nullptr)
@@ -145,7 +151,7 @@
      buffer = _this->lastBuffer->buffer;
      buffSize = _this->lastBuffer->buffSize;
      LOG_INFO << "DeliverFrameCallback buffSize=" << buffSize << LOG_ENDL;
      //LOG_INFO << "DeliverFrameCallback buffSize=" << buffSize << LOG_ENDL;
      //static size_t f = 0;
      //static FILE *pFile = fopen("/data/bb.264", "wb");
      //fwrite(buffer, sizeof(char), buffSize, pFile);
@@ -194,6 +200,7 @@
bool PL_RTSPServer2::init(void* args)
{
   RTSPServer2_Internal* in = (RTSPServer2_Internal*)internal;
   in->reset();
   if (args)
   {
@@ -288,7 +295,7 @@
   int ret = pthread_mutex_unlock(in->queue_empty_mutex);
   if (ret != 0)
   {
      //LOG_WARN << "pthread_mutex_unlock queue_empty_mutex, ret=" << ret << std::endl;
      LOG_WARN << "pthread_mutex_unlock queue_empty_mutex, ret=" << ret << std::endl;
   }
   return true;
}