mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2025-08-18 01:15:46 +00:00
Round down odd height values to avoid NVENC initialization failure
This commit is contained in:
parent
86751d9162
commit
4f9d45fbb5
@ -208,6 +208,14 @@ int LiStartConnection(PSERVER_INFORMATION serverInfo, PSTREAM_CONFIGURATION stre
|
||||
err = -1;
|
||||
goto Cleanup;
|
||||
}
|
||||
|
||||
// Height must not be odd or NVENC will fail to initialize
|
||||
if (StreamConfig.height & 0x1) {
|
||||
Limelog("Encoder height must not be odd. Rounding %d to %d",
|
||||
StreamConfig.height,
|
||||
StreamConfig.height & ~0x1);
|
||||
StreamConfig.height = StreamConfig.height & ~0x1;
|
||||
}
|
||||
|
||||
// Extract the appversion from the supplied string
|
||||
if (extractVersionQuadFromString(serverInfo->serverInfoAppVersion,
|
||||
|
Loading…
x
Reference in New Issue
Block a user