1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-22 16:08:39 -05:00

qrtplib: take the ral RTP header size (20 bytes) into account and have a multiple of 20ms frame for too small packets

This commit is contained in:
f4exb 2018-03-27 19:50:02 +02:00
parent 5b45f5b178
commit c2d92ab888

View File

@ -130,7 +130,12 @@ void RTPSink::setPayloadInformation(PayloadType payloadType, int sampleRate)
qDebug("RTPSink::setPayloadInformation: set default timestamp increment to %d: %s", timestampinc, qrtplib::RTPGetErrorString(status).c_str()); qDebug("RTPSink::setPayloadInformation: set default timestamp increment to %d: %s", timestampinc, qrtplib::RTPGetErrorString(status).c_str());
} }
int maximumPacketSize = std::max(m_bufferSize+40, RTP_MINPACKETSIZE); int maximumPacketSize = m_bufferSize+20; // was +40
while (maximumPacketSize < RTP_MINPACKETSIZE) {
maximumPacketSize += m_bufferSize;
}
status = m_rtpSession.SetMaximumPacketSize(maximumPacketSize); status = m_rtpSession.SetMaximumPacketSize(maximumPacketSize);
if (status < 0) { if (status < 0) {