DATV decoder: fixed UDP sender dropping packets. Fixes issue #579

This commit is contained in:
f4exb 2020-08-29 12:46:37 +02:00
parent 97efda734f
commit b33f37952c
1 changed files with 3 additions and 2 deletions

View File

@ -44,9 +44,10 @@ void DATVUDPStream::pushData(const char *chrData, int nbTSBlocks)
for (int i = 0; i < nbTSBlocks; i++)
{
if (m_tsBlockIndex < m_tsBlocksPerFrame)
std::copy(chrData + i*m_tsBlockSize, chrData + (i+1)*m_tsBlockSize, m_tsBuffer + m_tsBlockIndex*m_tsBlockSize);
if (m_tsBlockIndex < m_tsBlocksPerFrame - 1)
{
std::copy(chrData + i*m_tsBlockSize, chrData + (i+1)*m_tsBlockSize, m_tsBuffer + m_tsBlockIndex*m_tsBlockSize);
m_tsBlockIndex++;
}
else