houxiao
2017-08-11 3e52c086bcdeb2293e4a182863bcb984c79315d5
bug fix for rtsp server

git-svn-id: http://192.168.1.226/svn/proxy@1006 454eff88-639b-444f-9e54-f578c98de674
1个文件已修改
11 ■■■■ 已修改文件
RtspFace/PL_RTSPServer2.cpp 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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;
}