From 12879769af38a00425309e292b2c167afc6612c1 Mon Sep 17 00:00:00 2001
From: pansen <pansen626@sina.com>
Date: 星期四, 04 四月 2019 11:27:38 +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