From 73ced9fe2a50e20a642132a8c576ec046bf229c4 Mon Sep 17 00:00:00 2001
From: Nicolas Pope <nwpope@utu.fi>
Date: Wed, 9 Oct 2019 12:10:03 +0300
Subject: [PATCH] Reset encode every 10 frames

---
 components/rgbd-sources/src/streamer.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/components/rgbd-sources/src/streamer.cpp b/components/rgbd-sources/src/streamer.cpp
index b466d6b20..4a9e5400c 100644
--- a/components/rgbd-sources/src/streamer.cpp
+++ b/components/rgbd-sources/src/streamer.cpp
@@ -429,6 +429,7 @@ void Streamer::_process(ftl::rgbd::FrameSet &fs) {
 					if (enc2) enc2->reset();
 				}
 
+				if (fs.timestamp % (10*ftl::timer::getInterval()) == 0) enc1->reset();
 				enc1->encode(fs.frames[j].get<cv::Mat>(Channel::Colour), src->hq_bitrate, [this,src,hasChan2](const ftl::codecs::Packet &blk){
 					_transmitPacket(src, blk, 0, hasChan2, true);
 				});
-- 
GitLab