From 6540a2a9d69432c4cc475e3b32eae11e9e0ace73 Mon Sep 17 00:00:00 2001 From: chenshijun <csj_sky@126.com> Date: 星期四, 11 四月 2019 20:28:10 +0800 Subject: [PATCH] 1.srs的分辨率在config.json配置 2.单播推流控制,国标摄像机差一个关闭测试 3. 底库字段添加 --- QiaoJiaSystem/GB28181DecoderModel/FFmpegDecoderJPG.cpp | 15 +++++++++++---- 1 files changed, 11 insertions(+), 4 deletions(-) diff --git a/QiaoJiaSystem/GB28181DecoderModel/FFmpegDecoderJPG.cpp b/QiaoJiaSystem/GB28181DecoderModel/FFmpegDecoderJPG.cpp index 0cfd3b4..a6871d4 100644 --- a/QiaoJiaSystem/GB28181DecoderModel/FFmpegDecoderJPG.cpp +++ b/QiaoJiaSystem/GB28181DecoderModel/FFmpegDecoderJPG.cpp @@ -32,7 +32,7 @@ dst.data, dst.linesize); sws_freeContext(convert_ctx); - DBG("m.size is " << m.size()); +// DBG("m.size is " << m.size()); // LOG_IF(); return m; @@ -145,7 +145,8 @@ * @param p_this */ void BASICGB28181::FFmpegDecoderJPG::BareFlowDecoderThd(FFmpegDecoderJPG *p_this) { - DBG(p_this->m_camIdx << " BareFlowDecoderThd ok ... gpuIdx is " << p_this->m_gpuIdx); + DBG(p_this->m_camIdx << " BareFlowDecoderThd ok ... gpuIdx is " << p_this->m_gpuIdx); + DBG("p_thisADDR:" << p_this << "p_this->m_running" << p_this->m_running); while (!p_this->m_running) { p_this->m_running = true; @@ -197,6 +198,12 @@ vi = i; break; } + } + if(vi == -1)//鏃犺棰戝寘 + { + ERR("no video packet!!"); + p_this->m_running = false; + continue; } p_this->stream = p_this->ic->streams[vi]; p_this->video_st = p_this->stream; @@ -446,7 +453,7 @@ delete iter->m_packet.data; iter = m_packetsVec.erase(iter); while (!(iter->m_packet.flags & AV_PKT_FLAG_KEY)) { - INFO("DropFrame: " << iter->m_frameId); +// INFO("DropFrame: " << iter->m_frameId); delete iter->m_packet.data; iter = m_packetsVec.erase(iter); } @@ -529,7 +536,7 @@ m_frameIndex++; m_packetsVec.push_back({m_frameIndex, newPacket}); if (newPacket.flags & AV_PKT_FLAG_KEY) { - DBG("newPacket.flags & AV_PKT_FLAG_KEY "); +// DBG("newPacket.flags & AV_PKT_FLAG_KEY "); m_last_I_FrameId = m_frameIndex; } } -- Gitblit v1.8.0