mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2025-07-01 07:15:39 +00:00
Adjust the requested packet size to account for the encryption header
This commit is contained in:
parent
06f18be4bf
commit
298f356acb
@ -311,6 +311,12 @@ static PSDP_OPTION getAttributesList(char*urlSafeAddr) {
|
||||
snprintf(payloadStr, sizeof(payloadStr), "%d", StreamConfig.fps);
|
||||
err |= addAttributeString(&optionHead, "x-nv-video[0].maxFPS", payloadStr);
|
||||
|
||||
// Adjust the video packet size to account for encryption overhead
|
||||
if (EncryptionFeaturesEnabled & SS_ENC_VIDEO) {
|
||||
LC_ASSERT(StreamConfig.packetSize % 16 == 0);
|
||||
StreamConfig.packetSize -= sizeof(ENC_VIDEO_HEADER);
|
||||
LC_ASSERT(StreamConfig.packetSize % 16 == 0);
|
||||
}
|
||||
snprintf(payloadStr, sizeof(payloadStr), "%d", StreamConfig.packetSize);
|
||||
err |= addAttributeString(&optionHead, "x-nv-video[0].packetSize", payloadStr);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user