Round down the specified packet size to the nearest multiple of 16 rather than forcing 1024 all the time

This commit is contained in:
Cameron Gutman 2017-05-26 21:17:43 -07:00
parent 86447399a9
commit 6e31c21815

View File

@ -223,8 +223,9 @@ int LiStartConnection(PSERVER_INFORMATION serverInfo, PSTREAM_CONFIGURATION stre
memcpy(&StreamConfig, streamConfig, sizeof(StreamConfig));
RemoteAddrString = strdup(serverInfo->address);
// Because FEC is now supported, we can only support 1024 byte packets
StreamConfig.packetSize = 1024;
// FEC only works in 16 byte chunks, so we must round down
// the given packet size to the nearest multiple of 16.
StreamConfig.packetSize -= StreamConfig.packetSize % 16;
// Extract the appversion from the supplied string
if (extractVersionQuadFromString(serverInfo->serverInfoAppVersion,