From 3b4275366b252df97c0273e30ed7f1bbee6e9995 Mon Sep 17 00:00:00 2001
From: zhangmeng <zhangmeng@aiiot.com>
Date: 星期三, 25 三月 2020 14:45:52 +0800
Subject: [PATCH] debug for local video

---
 csrc/wrapper.cpp |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/csrc/wrapper.cpp b/csrc/wrapper.cpp
index 8ca7b16..4964629 100644
--- a/csrc/wrapper.cpp
+++ b/csrc/wrapper.cpp
@@ -222,7 +222,7 @@
 
             bool exist = access(input_url_.c_str(), 0) == 0;
             if (exist){
-                wTime <<= 1;
+                wTime += wTime/2;
                 file_rebootime++;
             }
 
@@ -233,10 +233,6 @@
                 if (in->readPacket(&data->getAVPacket()) != 0){
                     logIt("read packet error, id: %lld", id);
                     break;
-                }
-                if (exist){
-                    // 璁板綍瑙g爜鐨勬枃浠舵湁澶氬皯甯�
-                    file_frame++;
                 }
                 // 闈為煶瑙嗛
                 if (in->notVideoAudio(&data->getAVPacket())){
@@ -263,7 +259,9 @@
                 id++;
 
                 //鏈湴鏂囦欢澶揩sleep涓�涓�
-                if (exist){
+                if (exist && in->isVideoPkt(&data->getAVPacket())){
+                    // 璁板綍瑙g爜鐨勬枃浠舵湁澶氬皯甯�
+                    file_frame++;
                     usleep(wTime);
                 }
 

--
Gitblit v1.8.0