From b5ac5f7d1e0f79d332dcddc3dabd8709b1e2a2ea Mon Sep 17 00:00:00 2001 From: chenshijun <csj_sky@126.com> Date: 星期三, 10 四月 2019 19:42:29 +0800 Subject: [PATCH] 解决nsg消费者的topic名称带有./的bug 注释一些错误打印 --- 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