From da184ac7eef8ca74e12bdc63abf205e2fd5f9917 Mon Sep 17 00:00:00 2001 From: pans <pansen626@sina.com> Date: 星期三, 03 四月 2019 09:42:55 +0800 Subject: [PATCH] 云南调试 --- QiaoJiaSystem/GB28181DecoderModel/FFmpegDecoderJPG.cpp | 13 ++++++++++--- 1 files changed, 10 insertions(+), 3 deletions(-) diff --git a/QiaoJiaSystem/GB28181DecoderModel/FFmpegDecoderJPG.cpp b/QiaoJiaSystem/GB28181DecoderModel/FFmpegDecoderJPG.cpp index 0cfd3b4..af7f598 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); } -- Gitblit v1.8.0