From 6693aad073e8b73ce5e417959648a0799d5a33ce Mon Sep 17 00:00:00 2001 From: Doug McLain Date: Mon, 28 Mar 2022 11:48:25 -0400 Subject: [PATCH] Fix tcd crash on M17 TX --- Controller.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Controller.cpp b/Controller.cpp index 0d37989..d1a69b5 100644 --- a/Controller.cpp +++ b/Controller.cpp @@ -307,6 +307,8 @@ void CController::AudiotoCodec2(std::shared_ptr packet) // push the packet onto both the dstar and the dmr queue. void CController::Codec2toAudio(std::shared_ptr packet) { + uint8_t ambe2[9]; + if (packet->IsSecond()) { if (packet->GetCodecIn() == ECodecType::c2_1600) @@ -349,7 +351,9 @@ void CController::Codec2toAudio(std::shared_ptr packet) } // the only thing left is to encode the two ambe, so push the packet onto both AMBE queues dstar_device->AddPacket(packet); - dmrsf_device->AddPacket(packet); + + md380_encode_fec(ambe2, packet->GetAudioSamples()); + packet->SetDMRData(ambe2); } void CController::ProcessC2Thread()