From 24e0385ca573aadc987b61973ff7057ac0e4aa2f Mon Sep 17 00:00:00 2001
From: Nicolas Pope <nwpope@utu.fi>
Date: Fri, 9 Aug 2019 12:05:12 +0300
Subject: [PATCH] Swap debug output

---
 components/rgbd-sources/src/net.cpp         | 3 +--
 components/rgbd-sources/src/stereovideo.cpp | 1 +
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/components/rgbd-sources/src/net.cpp b/components/rgbd-sources/src/net.cpp
index 12a76cc40..68f46fc2b 100644
--- a/components/rgbd-sources/src/net.cpp
+++ b/components/rgbd-sources/src/net.cpp
@@ -150,8 +150,6 @@ void NetSource::_recvChunk(int64_t frame, int chunk, bool delta, const vector<un
 					// Lock to allow buffer swap
 					UNIQUE_LOCK(mutex_,lk2);
 
-					chunk_count_ = 0;
-
 					// Swap the double buffers
 					cv::Mat tmp;
 					tmp = rgb_;
@@ -161,6 +159,7 @@ void NetSource::_recvChunk(int64_t frame, int chunk, bool delta, const vector<un
 					depth_ = d_depth_;
 					d_depth_ = tmp;
 
+					chunk_count_ = 0;
 					timestamp_ = current_frame_;
 					current_frame_ = frame;
 				}
diff --git a/components/rgbd-sources/src/stereovideo.cpp b/components/rgbd-sources/src/stereovideo.cpp
index d83fdb194..2e5ad52ba 100644
--- a/components/rgbd-sources/src/stereovideo.cpp
+++ b/components/rgbd-sources/src/stereovideo.cpp
@@ -167,6 +167,7 @@ void StereoVideoSource::swap() {
 	tmp = right_;
 	right_ = cap_right_;
 	cap_right_ = tmp;
+	LOG(INFO) << "SWAP SV " << timestamp_;
 }
 
 bool StereoVideoSource::compute(int n, int b) {	
-- 
GitLab