Reset lastFrameValid when used up.

This commit is contained in:
Jonathan Naylor 2016-08-09 17:20:26 +01:00
parent ad4cb859b5
commit 443c363b1c
2 changed files with 5 additions and 1 deletions

View file

@ -1562,8 +1562,10 @@ void CDMRSlot::insertSilence(unsigned int count)
for (unsigned int i = 0U; i < count; i++) {
// Only use our silence frame if its AMBE audio data
if (fid == FID_ETSI || fid == FID_DMRA) {
if (i > 0U)
if (i > 0U) {
::memcpy(data, DMR_SILENCE_DATA, DMR_FRAME_LENGTH_BYTES + 2U);
m_lastFrameValid = false;
}
}
if (n == 0U) {

View file

@ -848,6 +848,8 @@ void CDStarControl::insertSilence(unsigned int count)
writeQueueDataNet(m_lastFrame);
}
} else {
m_lastFrameValid = false;
if (n == 0U)
writeQueueDataNet(DSTAR_NULL_FRAME_SYNC_BYTES);
else