From 85bc8f47c3b7292eeca70052ff805bce04d6edcd Mon Sep 17 00:00:00 2001 From: Tom Early Date: Sat, 11 Dec 2021 14:18:25 -0700 Subject: [PATCH] treat last voiceframe --- reflector/DExtraProtocol.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/reflector/DExtraProtocol.cpp b/reflector/DExtraProtocol.cpp index 6a7a17a..f917f4a 100644 --- a/reflector/DExtraProtocol.cpp +++ b/reflector/DExtraProtocol.cpp @@ -607,7 +607,10 @@ bool CDextraProtocol::EncodeDvFramePacket(const CDvFramePacket &Packet, CBuffer Buffer->Set(tag, sizeof(tag)); Buffer->Append(Packet.GetStreamId()); - Buffer->Append((uint8_t)(Packet.GetPacketId() % 21)); + uint8_t id = Packet.GetDstarPacketId() % 21; + if (Packet.IsLastPacket()) + id |= 0x40U; + Buffer->Append(id); Buffer->Append((uint8_t *)Packet.GetCodecData(ECodecType::dstar), 9); Buffer->Append((uint8_t *)Packet.GetDvData(), 3);