Skip to content
Snippets Groups Projects
Commit e4e04fc0 authored by Nicolas Pope's avatar Nicolas Pope
Browse files

Fix for broken net frame sync

parent 0fbb5e29
No related branches found
No related tags found
No related merge requests found
Pipeline #17205 passed
......@@ -301,7 +301,6 @@ void NetSource::_recvPacket(short ttimeoff, const ftl::codecs::StreamPacket &spk
}
++frame.chunk_count[channum];
if (frame.chunk_count[channum] == frame.chunk_total[channum]) ++frame.channel_count;
if (frame.chunk_count[channum] > frame.chunk_total[channum]) {
LOG(WARNING) << "Too many channel packets received, discarding";
return;
......@@ -336,6 +335,8 @@ void NetSource::_recvPacket(short ttimeoff, const ftl::codecs::StreamPacket &spk
// TODO:(Nick) Decode directly into double buffer if no scaling
if (frame.chunk_count[channum] == frame.chunk_total[channum]) ++frame.channel_count;
// Last chunk of both channels now received, so we are done.
if (frame.channel_count == spkt.channel_count) {
_completeFrame(frame, now-(spkt.timestamp+frame.tx_latency));
......
......@@ -494,7 +494,7 @@ void Streamer::_process(ftl::rgbd::FrameSet &fs) {
// TODO: Stagger the reset between nodes... random phasing
if (fs.timestamp % (10*ftl::timer::getInterval()) == 0) enc1->reset();
enc1->encode(fs.frames[j].get<cv::cuda::GpuMat>(Channel::Colour), src->hq_bitrate, [this,src,hasChan2,&mtx](const ftl::codecs::Packet &blk){
enc1->encode(fs.frames[j].get<cv::cuda::GpuMat>(Channel::Colour), src->hq_bitrate, [this,src,hasChan2](const ftl::codecs::Packet &blk){
_transmitPacket(src, blk, Channel::Colour, hasChan2, Quality::High);
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment